When I'm trying to import contacts from a .vcf file, Contacts app always produces parsing error with a message in the modal window: ``` Error reading file An error occured reading the file 'test-contacts.vcf' ``` Other than that, there's also always this error message in the logs: ``` contacts-app.vala:390: Couldn't parse file: Child process exited with code 127 /app/libexec/gnome-contacts/gnome-contacts-parser: error while loading shared libraries: libfolks.so.26: cannot open shared object file: No such file or directory ``` Here are the exact test-contacts.vcf text: ``` BEGIN:VCARD VERSION:3.0 UID:pas-id-3aeb536de133021e9946eba143ce48f69c5e6ee5 TEL;TYPE=CELL;X-EVOLUTION-E164=0200100900,"+30":+300200100900 FN:Test Person N:Person;Test;;; X-EVOLUTION-FILE-AS:Person\, Test EMAIL;TYPE=PERSONAL:test001 REV:2024-03-31T12:54:41Z END:VCARD BEGIN:VCARD VERSION:3.0 UID:pas-id-2060233ed586e12d2954dc7576ac414d635e934f TEL;TYPE=CELL;X-EVOLUTION-E164=00900200300,"+1":+100900200300 FN:Test Person 2 N:2;Test;Person;; X-EVOLUTION-FILE-AS:2\, Test EMAIL;TYPE=PERSONAL:test002 REV:2024-03-31T12:55:18Z END:VCARD ``` Reproducible: Always Steps to Reproduce: 1. Open GNOME Contacts 2. Open Main Menu 3. Choose "Import From File..." 4. Choose any valid .vcf file 5. Observe error message "Error reading file" in modal window Actual Results: .vcf is not parsed, no new contacts are added to the list. Expected Results: .vcf is parsed, new contacts are added to the list. OS: Fedora Silverblue 39 Shell: GNOME 45.5 Contacts version: 45 App packaging: Flatpak Repository: fedora ``` $ flatpak list --system --app --columns=name,application,origin | grep Contacts Contacts org.gnome.Contacts fedora ```
`flathub` repository version doesn't have this malfunction, so the issue should be with the build in `fedora` Flatpak repo. @harrymichal are you still the maintainer of this package?
I only really built the original flatpak and have not been involved with it ever since. Looking at the git history, @klember or @yselkowi could know a bit more.
Confirmed, but cause still unclear.
The cause is the use of LD_LIBRARY_PATH for adding flatpak directories to the linker search path. When loading a .vcf file, Contacts passes this to another process (presumably in order to avoid the app itself crashing in the case of invalid input) but does not pass the environment (specifically LD_LIBRARY_PATH) to it, and as that binary depends on libfolks (which is in /app), it fails to launch. The solution is to not rely on LD_LIBRARY_PATH and instead use dynamic ld.so.cache generation as in Flathub flatpaks. https://src.fedoraproject.org/rpms/flatpak-runtime-config/c/641ea400561c1c79405c4e88aa248c8add914e19?branch=f41 https://src.fedoraproject.org/flatpaks/flatpak-runtime/c/1fc0fa62adcf01ee11fede5889416fbe4a24637d?branch=f41 The fix will end up being in an updated runtime, which will have this bug attached when ready.
FEDORA-FLATPAK-2024-947f40556a (flatpak-runtime-f41-17 and flatpak-sdk-f41-14) has been submitted as an update to Fedora 41 Flatpaks. https://bodhi.fedoraproject.org/updates/FEDORA-FLATPAK-2024-947f40556a
FEDORA-FLATPAK-2024-947f40556a has been pushed to the Fedora 41 Flatpaks testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-FLATPAK-2024-947f40556a See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-FLATPAK-2024-947f40556a (flatpak-runtime-f41-17 and flatpak-sdk-f41-14) has been pushed to the Fedora 41 Flatpaks stable repository. If problem still persists, please make note of it in this bug report.