Error messages after contact import


#1

Hi all,

i just finished my Nextcloud Nextcloud 12.0.3 installation and managed to synchronize the calender to my IOS devices and Outlook.

But after importing the contacts i got this log entry:

atal webdav Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing 'INSERT INTO `oc_calendars` (`principaluri`, `uri`, `synctoken`, `transparent`, `components`, `displayname`, `calendarcolor`) VALUES(?, ?, ?, ?, ?, ?, ?)' with params ["principals\/users\/Mirko", "contact_birthdays", 1, 0, "VEVENT,VTODO", "Contact birthdays", "#FFFFCA"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'principals/users/Mirko-contact_birthdays' for key 'calendars_index' /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 128: Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException)) /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 1015: Doctrine\DBAL\DBALException driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'INSERT INTO `oc...', Array) /srv/dev-disk-by-label-data/www/nextcloud/lib/private/DB/Connection.php - line 213: Doctrine\DBAL\Connection->executeUpdate('INSERT INTO `oc...', Array, Array) /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 208: OC\DB\Connection->executeUpdate('INSERT INTO `*P...', Array, Array) /srv/dev-disk-by-label-data/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 213: Doctrine\DBAL\Query\QueryBuilder->execute() /srv/dev-disk-by-label-data/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php - line 673: OC\DB\QueryBuilder\QueryBuilder->execute() /srv/dev-disk-by-label-data/www/nextcloud/apps/dav/lib/CalDAV/BirthdayService.php - line 120: OCA\DAV\CalDAV\CalDavBackend->createCalendar('principals/user...', 'contact_birthda...', Array) /srv/dev-disk-by-label-data/www/nextcloud/apps/dav/lib/CalDAV/BirthdayService.php - line 82: OCA\DAV\CalDAV\BirthdayService->ensureCalendarExists('principals/user...') /srv/dev-disk-by-label-data/www/nextcloud/apps/dav/lib/AppInfo/Application.php - line 98: OCA\DAV\CalDAV\BirthdayService->onCardChanged('2', '71848257-7459-4...', 'BEGIN VCARD\r\nVE...') [internal function] OCA\DAV\AppInfo\Application->OCA\DAV\AppInfo\{closure}(Object(Symfony\Component\EventDispatcher\GenericEvent), '\\OCA\\DAV\\CardDA...', Object(Symfony\Component\EventDispatcher\EventDispatcher)) /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 174: call_user_func(Object(Closure), Object(Symfony\Component\EventDispatcher\GenericEvent), '\\OCA\\DAV\\CardDA...', Object(Symfony\Component\EventDispatcher\EventDispatcher)) /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 43: Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, '\\OCA\\DAV\\CardDA...', Object(Symfony\Component\EventDispatcher\GenericEvent)) /srv/dev-disk-by-label-data/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php - line 622: Symfony\Component\EventDispatcher\EventDispatcher->dispatch('\\OCA\\DAV\\CardDA...', Object(Symfony\Component\EventDispatcher\GenericEvent)) /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/sabre/dav/lib/CardDAV/AddressBook.php - line 144: OCA\DAV\CardDAV\CardDavBackend->createCard('2', '71848257-7459-4...', 'BEGIN VCARD\r\nVE...') /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096: Sabre\CardDAV\AddressBook->createFile('71848257-7459-4...', 'BEGIN VCARD\r\nVE...') /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525: Sabre\DAV\Server->createFile('addressbooks/us...', Resource id #85, NULL) [internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response)) /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array) /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PUT', Array) /srv/dev-disk-by-label-data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response)) /srv/dev-disk-by-label-data/www/nextcloud/apps/dav/lib/Server.php - line 258: Sabre\DAV\Server->exec() /srv/dev-disk-by-label-data/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 33: OCA\DAV\Server->exec() /srv/dev-disk-by-label-data/www/nextcloud/remote.php - line 162: require_once('/srv/dev-disk-b...') {main}

Can somebody please tell me what i need to do?

And what is the reason that only contact with pictures are marked with “!” ?

Thanks


#2

What do you mean by being maked with “!”? Would you mind providing a screenshot showing that behavior?

Looks like the generation of the “contact’s birthdays calendar” failed or misbehaved. Nothing directly to worry about, if you don’t miss the birthday of a contact of yours! :wink:
Either way, you can force a sync of the birthday calendar via occ (https://docs.nextcloud.com/server/12/admin_manual/configuration_server/occ_command.html#dav-label)


#3

Hi,

Please find screenshot attached.

It looks that only contacts with images are marked.

If i download a image from a contact and upload the same image once again the „!“ is gone.


#4

This smybol means, that the respective vcard was repaired or adapted according to vcard version 3.
Since you have this symbol for contacts with images I assume that the vcards you imported used an old way of describing the contact image, which gets adapted by the app.
After checking that everything is Ok with the contact, you can confirm the changes via the click on the little checkmark next to the down arrow icon in the top right.


#5

OK.

Thanks for explaining.

But just „saving“ is not working. It looks that i need to delete or replace the image.


#6

Hmm… could you open an issue on https://github.com/nextcloud/contacts/issues and describe the behavior over there? It would also be helpful if you could provide a sample vcard, where the problem occurs.


#7

Do not have a Github account.


#8

Do you have an example vcard that you can share with me?
Then I will open an issue, so that we can track it and write a fix for it.


#9

Try to upload a vcf but it‘s not allowed.

Shall i rename or send it via mail to you?


#10

Or you can past it here! :slight_smile:
Do you have any error in your browser’s log?


#11

What du you mean with „Paste it here“ ?

As i wrote before, it‘s not allowed to upload files with extension .vcf to the Forum.

Which Browser log you mean? While uploading the vcf to Forum or modifying at Nextcloud?


#12

A vcf file is basically a txt file, so you can just paste it raw here! :slight_smile:
For the browser’s log, I’d like to see the nextcloud’s one, just after clicking the save button please.


#13

OK. VCF as txt

BEGIN:VCARD VERSION:3.0 PRODID:-//Easy Backup//7.6//iOS FN:Failed contact test REV:20170920T071809Z PHOTO;BASE64=:/9j/4AAQSkZJRgABAQAASABIAAD/4QBYRXhpZgAATU0AKgAAAAgAAgESAAMAA AABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAZKADAAQAAAA BAAAAZAAAAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZj wCyBOmACZjs+EJ+/8AAEQgAZABkAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgM EBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCs cEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN 0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1 tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAk KC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwF WJy0QoW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6OPEjbjmkBJiqzh2kIEmwDFW OcnOMc/WowqNyQM0D9Sa3JMQLHJ9amqOMALgcVJQB/9PK+2Tf5FJ9qf2qQxgDAGT603yz6UDJI 70LnegbPT2pgvG9B+VHln0o8s+lADhfSL2H5Un21sAFQcU5I8t8w4pDGc8CgAW+ZWzsU/hUh1F yc7R9Ki8s+lHlt6UAS/bgx+ZBVlmQ421S8s+lSbCVyOCO1AF77T8/3Rz35qGWfZF8nWquJPemO rupX1oGILqcdGNL9rn/ALxqqbaSj7NLS5UFz//UzPtUPvS/a4fesyigdzU+2Q+9H2uH3rLooC5 qfa4fej7ZD71l0UBc1ftkPvR9sh96yqKAuav2yH3pftkPvWTRQFzV+2Q+9H2yH3rKooC5q/bIP ej7ZB71lUUBc//V5qiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q== UID:f9dc591c-fb84-495d-b52e-3a81f8ed63cd END:VCARD

Chrome Error log:

TypeError: Cannot read property 'forEach' of undefined at vcard.js?v=f01b5b75693624903b7609bae7c38799-0:240 at Array.forEach (<anonymous>) at vcard.js?v=f01b5b75693624903b7609bae7c38799-0:238 at Array.forEach (<anonymous>) at vcard.js?v=f01b5b75693624903b7609bae7c38799-0:210 at Array.forEach (<anonymous>) at Object.generate (vcard.js?v=f01b5b75693624903b7609bae7c38799-0:206) at JSON2vCard_filter.js:4 at Contact.setProperty (contact_model.js:267) at Contact.syncVCard (contact_model.js:303) (anonymous) @ angular.js?v=f01b5b75693624903b7609bae7c38799-0:13920 (anonymous) @ angular.js?v=f01b5b75693624903b7609bae7c38799-0:10467 $apply @ angular.js?v=f01b5b75693624903b7609bae7c38799-0:17787 (anonymous) @ angular.js?v=f01b5b75693624903b7609bae7c38799-0:25890 dispatch @ core.js?v=f01b5b75693624903b7609bae7c38799-0:3 r.handle @ core.js?v=f01b5b75693624903b7609bae7c38799-0:3


#14

Thx! I can reproduce! :slight_smile:
Will look into this!