Problem importing contacts using .vcf file [SOLVED]

OS: PureOS 10/Byzanthium
Contacts app: 43.beta

Received the L5 more than a year ago, update it once a month. Do not use it all the time, can make calls, receive calls, etc.

Want to import a contacts.vcf file from another phone in the Librem 5, used a USB-drive to copy this file on the L5.

  1. Attempt using the Contacts app

In the Contacts app, Import → select file:

Continue Import?
By continuing you will import 456 contacts

Press: Continue → app crashes.

*** Question: How can debug this, see what’s wrong?

The file was VCF V2, same result after I converted to VCF V3.


In the Contacts app → Preferences:

Primary Address Book

Local Address Book

Sometimes there is a ‘check’ after Local Address Book, sometimes there isn’t.


Create contact via the Contacts app, using the ‘+’ button:

Type: aaa
Press: Add

Response is Alert message:

No primary addressbook configured

  1. Attempt using the librem5-goodies script: l5-contacts-importer

Installed librem5-goodies.
Then run:

l5-contacts-importer /home/purism/Documents/vvv.vcf


Writing: card_import_L5_01.vcf
Writing: card_import_L5_02.vcf

Writing: card_import_L5_456.vcf
[ERROR] : accessing database: Timeout was reached
[ERROR] : accessing database: Timeout was reached
[ERROR] : accessing database: Timeout was reached
[ERROR] : accessing database: Timeout was reached

No contacts were imported.


In the l5-contacts-importer, printed the data of the file send to syncevolution, seems correct.

I am the opposite of syncevolution guru, but trying this:

syncevolution --print-items backend=evolution-contacts

also gives the result:

[ERROR] : accessing database: Timeout was reached

  1. For what’s it worth there is an endless amount of lines in journalctl all related to tracker-miner, tracker-store, and lines like:

Failed to start Tracker metadata database store and lookup manager.
tracker–store.service: Failed with result ‘exit code’.

Any help appreciated.

1 Like

Manually add each individual contact as an entry.

It’s been so long, but I remember a package that could be installed librem5-goodies which had an import tool for .vcf files.

1 Like

Maybe run gnome-contacts at the command line. If it crashes then maybe something will get output to the terminal.

Otherwise, make a copy of the source VCF file edited down so that just the first card remains. Try to import that. If it works, maybe chop the original file in half and import each half separately, applying this recursively to any failed half. (This may be a good strategy if there’s just one or two contacts that are for some reason causing a problem.)

I think librem5-goodies is obsolete for this purpose.

1 Like
44 How to export and import contacts

   Export all contacts to a VCF file:

   syncevolution --export /home/purism/guru/contacts.vcf backend=evolution-contacts

   Wipe out all contacts:

   syncevolution --delete-items backend=evolution-contacts --luids '*'

   Import contacts from a VCF file:

   syncevolution --import test.vcf backend=evolution-contacts
   #0: pas-id-552B785D00000008

   For more operations see also:
1 Like

Thanks but as I mentioned, manual entry via the Contacts app also fails: No primary addressbook configured

1 Like

Thanks but as mentioned above I tried l5-contacts-importer, but get an error: [ERROR] : accessing database: Timeout was reached.

1 Like

Thanks but as mentioned above, I tried syncevolution, and get an error, same for your suggestion ‘syncevolution --export /home/purism/guru/contacts.vcf backend=evolution-contacts’: ’ [ERROR] : accessing database: Timeout was reached’.

I guess something is not running, installed, or a rights problem …

1 Like

Starting gnome-contacts from the command line pops the contacts app with the message: Primary address book not found. But not always. As mentioned in the Contacts app Preferences Local Address Book is sometimes checked but sometimes is un-checkled.

syncevolution --print-databases | grep “system-address-book”
Personal (system-address-book)

syncevolution --print-items backend=evolution-contacts
[ERROR] : accessing database: Timeout was reached

Maybe something is not installed, local database is missing? Any idea where this file should be?

1 Like

Refer: Tips & Tricks · Wiki · Librem5 / Librem 5 Community Wiki · GitLab

(I know this is the right path because when I upgraded from amber to byzantium, I carefully copied that file away, reflashed, then carefully copied that file back - rather than export and import around the reflash, which is probably the “right” way to do it.)

1 Like

Thank you all, problem is SOLVED. Received my L5 Oct. 2022.
Tested it, worked and updated once a month.

It appeared ~/.local and subdirs/files were owned by root.
I noticed this when looking in journalctl:

The relationship key file directory /home/purism/.local/share/folks could not be created.
Error creating directory /home/purism/.local/share/folks: Permission denied

Changed ownership this recursively to purism:purism
Reinstalled syncevolution: sudo apt install --reinstall syncevolution

And now the Contacts app importing works! Yeah!

Also, some created files in .local/share and messages in journalctl reduced significantly

I am happy (for the moment) …


Good to hear.

OK, that’s weird but probably no chance of getting to the bottom of that this long afterwards unless you reflashed the phone yourself.

1 Like

Nope, never flashed the phone or messed with the phone, only did updates from the gui. When updating, I always got an alert that a file could not be found, but the updates worked anyway. I asked here about this but to no avail.

There was only one directory in ~/.local/share: applications.
Agree, this is weird, maybe something in the batchj L5 Oct. 2022? I don’t know.
After changing ownership, there are now many directories in ~/.local/share = normal.
Also had to sudo apt install --reinstall squeekboard.

Btw, tested my ,vcf file on my ubuntu 22.04 machine. installed syncevolution, modified the l5-contacts-importer script a little bit and imported without problem.