Exporting Contacts / People with vcardconverter doesn't work

'----------------------------------------------------------
Edit:
There is no bug here, at least for locally stored contacts.
The command just has to be executed as normal user with devel-su -p and not as root.
For remote contacts, the @nephros given below commands have to be used.
'----------------------------------------------------------

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 4.4.0.58, flashed (defaultuser) as well as upgraded (nemo)
HARDWARE (XA2, X10, X10 II, …): XA2 (others not tested)
UI LANGUAGE: EN UK
REGRESSION: (compared to previous public release: Yes, No, ?): Yes, seems that it used to work

DESCRIPTION: Contact export with

Contact export with:

devel-su -p vcardconverter --export contacts.vcf

Doesn’t work and returns an error message:

[W] unknown:0 - The ‘mergePresenceChanges’ option has not been configured - presence changes will only be reported via ContactManagerEngine::contactsPresenceChanged()
[D] unknown:0 - Exporting 0 contacts
[D] unknown:0 - Wrote 0 contacts

PRECONDITIONS:

None

STEPS TO REPRODUCE:

  1. Open a terminal
  2. Enter the command
devel-su -p vcardconverter --export contacts.vcf

EXPECTED RESULT:

Contacts would be exported in a text file

ACTUAL RESULT:

Not exporting, error message

ADDITIONAL INFORMATION:

(Please ALWAYS attach relevant data such as logs, screenshots, etc…)

1 Like

Command comes from this cheat sheet. I tested on my Xperia 10 II and it doesn’t work either.

The cheat sheet seems to be outdated. You need to specify a correct collectionId to the command so it finds the correct database.

I managed to get an export done using:

$ pkcon install nemo-qml-plugin-contacts-qt5-tools
$ devel-su -p contacts-tool collections

# this will print something like:
#      ID: qtcontacts:org.nemomobile.contacts.sqlite::xxxxxxxx31  Name: aggregate
#      ID: qtcontacts:org.nemomobile.contacts.sqlite::xxxxxxxx32  Name: local
#      ID: qtcontacts:org.nemomobile.contacts.sqlite::xxxxxxxx33  Name: SIM
#      ID: qtcontacts:org.nemomobile.contacts.sqlite::xxxxxxxx34  Name: SIM
#

# now take one of the ids (full string) and export the contacts:
$ devel-su -p  vcardconverter --export contacts_aggregate.vcf  qtcontacts:org.nemomobile.contacts.sqlite::xxxxxxxx31

Or, putting it all together:

 contacts-tool collections | awk '{print "vcardconverter --export " $2 "_" $4".vcf, $2"} | sh'
4 Likes

Now that SFOS docs are a wiki, someone who cares may update the cheat sheet source

3 Likes

Oh, you edited already.
Thank you for the alternative solution.
In two words, the cheat sheet command works for me if executed as specified. edit: for local contacts.

I added a comment to explicitly say it doesn’t work as root but only as user with devel-su -p
We made an error and didn’t RTFM correctly!
Sorry for the very bad signal/noise ratio of this thread.

I just tried on my side. I got an error and an empty file.

This is very strange…
As defaultuser in the stock shell?
I did export in /home/defaultuser/Documents

I got it. It’s because all of your contacts are stored locally. In my case, I save them on my Nextcloud server (with CardDAV).

Oh, I understand.
So I’ll edit my edit…

Thanks all for working this through. From what I understand, there’s no longer anything to address here: the solution is marked. So I’ve tagged this as “fixed”.

1 Like