Contacts: VCard object with uid already exists in this addressbook collection on creation

Created on 12 Jan 2019  路  8Comments  路  Source: nextcloud/contacts

Got the same behaviour, when trying to edit newly created contact name.

Nextcloud responses on editing:

XHR PUT https://<skip_domain>/remote.php/dav/addressbooks/users/user1/-/9D2DBD61-08D6-4A20-80BD-D680A4E06FDA.vcf

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
  <s:message>VCard object with uid already exists in this addressbook collection.</s:message>
</d:error>
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\PreconditionFailed</s:exception>
  <s:message>An If-Match header was specified, but none of the specified the ETags matched.</s:message>
  <s:header>If-Match</s:header>
</d:error>

Console log
2019-01-12 05 03 06

Tested in latest Firefox and Chrome. Also it's look like it looses focus on typing.

Nextcloud 15.0.0

Contacts 3.0.1

_Originally posted by @nick-denry in https://github.com/nextcloud/contacts/issues/842#issuecomment-453710893_


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

bug needs info

All 8 comments

Hello @nick-denry!
Have you created the contact through the app? Imported it?
Could you paste it here? The error is very straightforward: the UID field on the contact you just created is the same as another one present on the same addressbook. They cannot co-exists.

Hi!

Have you created the contact through the app?

Yes.

Could you paste it here?

No, it was a very first test contact. I think it's heavy related with the original issue, cause these errors happens when you trying to edit newly created or existed contacts before previous changes are applied.

You're right somehow about slow hardware (very slow atom cpu pc), but maybe you can reproduce it with network speed limitations via browser development tools.

@nick-denry Please test the last 3.0.3 version and see if you can reproduce this issue :)

I think you could close this. Can't reproduce it at moment with few attempts.

I am having the same problem in a fresh install of Nextcloud 16.0.3 on a new Debian Buster Server. Not sure if I should open a new issue. Here is the output that keeps coming, contacts are not synched from Android to Nextcloud correctly and neither between Nextcloud and Thunderbird/CardBook.

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: VCard object with uid already exists in this addressbook collection. at <>

  1. /var/www/html/cloud/3rdparty/sabre/dav/lib/CardDAV/AddressBook.php line 144
    OCA\DAV\CardDAV\CardDavBackend->createCard("2", "fc1bf920-97b9-4 ... f", "BEGIN:VCARD\r\n ... n")
  2. /var/www/html/cloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
    Sabre\CardDAV\AddressBook->createFile("fc1bf920-97b9-4 ... f", "BEGIN:VCARD\r\n ... n")
  3. /var/www/html/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
    Sabre\DAV\Server->createFile("addressbooks/us ... f", "BEGIN:VCARD\r\n ... n", null)
  4. <>
    Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  5. /var/www/html/cloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
  6. /var/www/html/cloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:PUT", [Sabre\HTTP\Requ ... }])
  7. /var/www/html/cloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  8. /var/www/html/cloud/apps/dav/lib/Server.php line 316
    Sabre\DAV\Server->exec()
  9. /var/www/html/cloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  10. /var/www/html/cloud/remote.php line 163
    undefinedundefinedrequire_once("/var/www/html/c ... p")

PUT /remote.php/dav/addressbooks/users/yan/contacts/fc1bf920-97b9-4f69-96e2-6a5f217d6557.vcf
from [IP] by yan at 2019-07-16T14:59:14+00:00

I have the same problem with 18

Same problem here, with NC 18.0.1 and contacts 3.1.9. Added new contact, edited the contact name, got the turning wheel and the same messages in the protocol.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spoorun picture spoorun  路  5Comments

IamSAB picture IamSAB  路  4Comments

RobertZenz picture RobertZenz  路  4Comments

brantje picture brantje  路  5Comments

Peque picture Peque  路  3Comments