Ask / Submit
4

Why does the vcard (vcf) import fail? [duplicate]

asked 2014-01-12 11:58:03 +0200

CsTom gravatar image

updated 2014-07-11 23:37:59 +0200

simo gravatar image

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...?!?)

edit retag flag offensive reopen delete

The question has been closed for the following reason "duplicate question" by CsTom
close date 2014-01-13 22:47:28.129189

Comments

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 vcardconverter 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 ( 2014-01-13 15:00:37 +0200 )edit

@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 )edit
1

Okay, 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

1 Answer

Sort by » oldest newest most voted
4

answered 2014-01-13 22:46:54 +0200

CsTom gravatar image

updated 2014-01-13 22:56:29 +0200

Argh! This is somehow a duplicate of https://together.jolla.com/question/6041/bug-import-vcard-with-family-details-fails/ afterall... :-/

I have removed the X-SPOUSE and X-CHILDREN details from the allcontacts.vcf file, and voilá, the entire file was imported. All 624 contacts.

The vcardconverter is seriously ... wrong. The skipped contacts didn't have family details (or at least almost none of them), yet those were "penalized" anyway. It needs to be addressed really soon, as more people get their Jollas, the more vcard ... problems will be out there.

Come on, just skip what you cannot handle(?), but don't fail the whole process...

(My current thinking is that vcardconverter reads the vcards in 100 pcs chunks, and if in that batch any card had some family details, the whole batch is failed... But then the next 100 might still gets imported if thats free from family details.)

edit flag offensive delete publish link more

Comments

1

Right, lets hope the vcard,, people app, and vcardconverter isssues do get fixed soonish, cause in mobile the contacts data is the single most important content that should be valid, accurate, uptodate and easily accessible..

foss4ever ( 2014-01-13 22:55:15 +0200 )edit

BTW: the root-cause of these issues seems to plain-text file-formats used in vcard transfers/protocols. If a real API or structured files and standardized formats were used (by all) we would be free from nost of these problems.. ;)

foss4ever ( 2014-01-13 23:03:26 +0200 )edit
1

No, because those extra fields are properly marked as X-something (as for extension of the standardized format) AND the vcardconverter actually understands that these are not some unknown tags to discard but some family details. So it is vcardconverter's bug. If it were less "smart" and would just ignored the unknown tags, everybody (but at least me) would have been way much happier :-)

Also Jolla adds its own tags:

X-GENDER:Unspecified
X-QTPROJECT-FAVORITE:false;0
CsTom ( 2014-01-13 23:08:04 +0200 )edit

Just by finding this bug in how vcardconverter handles this incotrectly doesn't mean rhat current vcard standard and its transfer and sync-protocol implementations were optimal or even flawless. Thus we have many sync/transfer.related problems (most of which are difficult for one partner alone to fix).

foss4ever ( 2014-01-13 23:21:42 +0200 )edit

Yeah, I do remember from the MyNokiaBackup-times (it was Sync, but still) how difficult it was even with just one vendor's (Nokia) phone-sortiment to have a relatively good service to cross sync contact details... So, just don't create more problems than you already have :-}

CsTom ( 2014-01-13 23:33:36 +0200 )edit

Question tools

Follow
1 follower

Stats

Asked: 2014-01-12 11:58:03 +0200

Seen: 4,417 times

Last updated: Jan 13 '14