monicahq / monica

Personal CRM. Remember everything about your friends, family and business relationships.
https://beta.monicahq.com
GNU Affero General Public License v3.0
21.4k stars 2.13k forks source link

vCard inport error when importing vCard with tag PHOTO exported from Google Contacts #3352

Open danielepo opened 4 years ago

danielepo commented 4 years ago

Describe the bug The import procedure doesn't complete successfully when the vCard exported from Google Contacts contains the PHOTO tag this is an example of a vCard that causes the problem

BEGIN:VCARD
VERSION:3.0
FN:Example Person
N:Person;Example;;;
EMAIL;TYPE=INTERNET:example@example.com
TEL;TYPE=CELL:333-111-2222
ADR;TYPE=HOME:;IT;;;;;
NOTE:Contatti\: contatta +393331112222\n\nGender: Female
PHOTO:https://lh5.googleusercontent.com/-loYaxbDCXKY/WM7jnFD68_I/AAAAAAAAAA
A/NYqgBiTD7dUevD5bnQo2VGs9u4rVX2CgwCOQCEAE/photo.jpg
END:VCARD

you can notice that the PHOTO tag is broken into two lines (this is how google exports it). I thought it was this the problem but then I tried putting the url in one line and i get the same error

BEGIN:VCARD
VERSION:3.0
FN:Example Person
N:Person;Example;;;
EMAIL;TYPE=INTERNET:example@example.com
TEL;TYPE=CELL:333-111-2222
ADR;TYPE=HOME:;IT;;;;;
NOTE:Contatti\: contatta +393331112222\n\nGender: Female
PHOTO:https://lh5.googleusercontent.com/-loYaxbDCXKY/WM7jnFD68_I/AAAAAAAAAAA/NYqgBiTD7dUevD5bnQo2VGs9u4rVX2CgwCOQCEAE/photo.jpg
END:VCARD

Removing the PHOTO tag will let you import the contact Screenshots

the import remains pending and never gets resolved: immagine

Which version are you using: hosting locally with Docker Compose

Context The vCard file is a *.vcf failingVCard.zip

asbiin commented 4 years ago

you can notice that the PHOTO tag is broken into two lines

That's normal, and it's regular vcard format.

But obviously there is a glitch I will investigate ...

Couto commented 3 years ago

Can confirm, I have .vcf file with aprox 120 contacts, most of them with the PHOTO tag. Only 17 are actually imported and the import progress report never concludes.

After removing the PHOTO tag from all my contacts, I was able to import the file by using the CLI

Tangential question: How can we clean up the import in progress lines for those who are self-hosting?

JDTm commented 5 months ago

Same problem also with iOS Cards. Removed All Photos, import with 90 contacts OK.