Why does the vcard (vcf) import fail? [duplicate]
I have a rather large vcf file exported from my N9. When imported to Jolla, only parts of it were ended up in contacts. I've tried to search for what the problem might be, but no apparent reason. There are even vcards getting excluded which has nothing else but an US-ASCII name (N:) and a TEL;TYPE=VOICE:
When trying to import from CLI (vcardconverter), I can see that 3 contacts are ignored due to family details (but that part is already reported here) and hundreds are ignored due to a mysterious "error: 5"
[D] main:139 - Unable to import contact "Foo Bar" error: 5
What is this error 5 in QContactManager ?
I also saw that Kabouik and chriadam (Chris Adams @ jolla) was discussing and analysing something similar on #jollamobile, but I haven't saw if there were any conclusion. Jollapeople, you might want to ping Chris in da hauz, if he had some solution already?
Oh, and all cards seem to be properly ended, there is no "VCARDBEGIN" in the file. (some reported that the individually exported cards not always end with CR(?)LF -- especially with N900 --, thus when merging them into one big file, the "previous" END:VCARD and the "next" BEGIN:VCARD lines might get joined. Well, this is not the case now)
UPDATE:http://doc.qt.digia.com/qtmobility/qcontactmanager.html#Error-enum
QContactManager::LockedError - 5 - The most recent operation failed because the datastore specified is currently locked
So, why the datastore is locked for some range of contacts, and suddenly available again? (and strangely the error boundary is round... The first 100 suceeds, then 300 fails, and from 400 it suceeds again...?!?)
Please show how are you trying to run vcardconverter from commandline? As you can easily call it wrong without the right cababilities? I'm assuming that you use invoker (as it will fail without)? And have you closed all foreground applications before doing the import?
rainisto ( 2014-01-13 14:40:15 +0200 )edit@rainisto: Yes, no visible applications were running. I just simply executed
CsTom ( 2014-01-13 15:00:37 +0200 )editvcardconverter allcontacts.vcf
as root. Btw, the result is the same as if I've imported the file via the GUI, but from CLI I can actually see what went wrong.@CsTom 2 errors in there, you are not supposed to run it as root, but as nemo, and you need to use invoker: "su - nemo; invoker --type=generic vcardconverter allcontacts.vcf" if you don't use invoker then data does not get imported to as nemo.privileged, and you that can cause those errors.
rainisto ( 2014-01-13 15:12:08 +0200 )edit(if you happen to mess up and do import as root then there is a danger of contactdb beeing root owned, and after that system applications that run as nemo.privileged do not have access to edit them anymore).
rainisto ( 2014-01-13 15:14:16 +0200 )editOkay, but as I said, the result was the same from the GUI (Settings->Apps->People->Import contacts), where I tried first. Nevertheless, now I've executed it via invoker, same result... Any other idea?
CsTom ( 2014-01-13 15:27:47 +0200 )edit