[Bug] Adding contacts in webinterface not correctly working in 18.0.0

After updating from NC 17 to NC 18.0.0 I am no longer able to add contacts correctly by using the webinterface: I add a contact and give the name “Testillo Tester” -> this works. But as soon as I want to change anything on this contact, the circle in top right of nc runs endless and the change is not performed. Doing exactly the same change by CardDAV on the iPhone works fine.

I attached the error message in the NC-log.

Nextcloud version: 18.0.0
Operating system and version: CentOS 7
Apache or nginx version: 2.4.24
PHP version: 7.3

{“reqId”:“XjFrlTlozCL4WeKdnxX4rAAAAAI”,“level”:4,“time”:“2020-01-29T11:25:09+00:00”,“remoteAddr”:“207.180.249.168”,“user”:“user12345”,“app”:“webdav”,“method”:“PUT”,“url”:"/remote.php/dav/addressbooks/users/user12345/contacts/19F60500-5A33-412D-A9D2-6365717D473D.vcf",“message”:{“Exception”:“Sabre\DAV\Exception\BadRequest”,“Message”:“VCard object with uid already exists in this addressbook collection.”,“Code”:0,“Trace”:[{“file”:"/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/3rdparty/sabre/dav/lib/CardDAV/AddressBook.php",“line”:144,“function”:“createCard”,“class”:“OCA\DAV\CardDAV\CardDavBackend”,“type”:"->",“args”:[“4”,“19F60500-5A33-412D-A9D2-6365717D473D.vcf”,“BEGIN:VCARD\r\nVERSION:4.0\r\nPRODID:-//Nextcloud Contacts v3.1.8\r\nUID:2c459e82-0949-48b9-9f14-221bad11ce5e\r\nREV;VALUE=DATE-AND-OR-TIME:20200129T112509Z\r\nFN:Testillo Tester\r\nADR;TYPE=HOME:;;;;;;\r\nEMAIL;TYPE=HOME:\r\nTEL;TYPE=“HOME,VOICE”:123456789\r\nEND:VCARD”]},{“file”:"/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:1096,“function”:“createFile”,“class”:“Sabre\CardDAV\AddressBook”,“type”:"->",“args”:[“19F60500-5A33-412D-A9D2-6365717D473D.vcf”,“BEGIN:VCARD\r\nVERSION:4.0\r\nPRODID:-//Nextcloud Contacts v3.1.8\r\nUID:2c459e82-0949-48b9-9f14-221bad11ce5e\r\nREV;VALUE=DATE-AND-OR-TIME:20200129T112509Z\r\nFN:Testillo Tester\r\nADR;TYPE=HOME:;;;;;;\r\nEMAIL;TYPE=HOME:\r\nTEL;TYPE=“HOME,VOICE”:123456789\r\nEND:VCARD”]},{“file”:"/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",“line”:525,“function”:“createFile”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[“addressbooks/users/user12345/contacts/19F60500-5A33-412D-A9D2-6365717D473D.vcf”,“BEGIN:VCARD\r\nVERSION:4.0\r\nPRODID:-//Nextcloud Contacts v3.1.8\r\nUID:2c459e82-0949-48b9-9f14-221bad11ce5e\r\nREV;VALUE=DATE-AND-OR-TIME:20200129T112509Z\r\nFN:Testillo Tester\r\nADR;TYPE=HOME:;;;;;;\r\nEMAIL;TYPE=HOME:\r\nTEL;TYPE=“HOME,VOICE”:123456789\r\nEND:VCARD”,null]},{“function”:“httpPut”,“class”:“Sabre\DAV\CorePlugin”,“type”:"->",“args”:[{“absoluteUrl”:“https://owncloud.xyzxyzxyz.de/remote.php/dav/addressbooks/users/user12345/contacts/19F60500-5A33-412D-A9D2-6365717D473D.vcf","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/3rdparty/sabre/event/lib/EventEmitterTrait.php",“line”:105,“function”:“call_user_func_array”,“args”:[[{“class”:“Sabre\DAV\CorePlugin”},“httpPut”],[{“absoluteUrl”:“https://owncloud.xyzxyzxyz.de/remote.php/dav/addressbooks/users/user12345/contacts/19F60500-5A33-412D-A9D2-6365717D473D.vcf","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]]},{“file”:"/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:479,“function”:“emit”,“class”:“Sabre\Event\EventEmitter”,“type”:"->",“args”:[“method:PUT”,[{“absoluteUrl”:“https://owncloud.xyzxyzxyz.de/remote.php/dav/addressbooks/users/user12345/contacts/19F60500-5A33-412D-A9D2-6365717D473D.vcf","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]]},{“file”:"/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:254,“function”:“invokeMethod”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“absoluteUrl”:“https://owncloud.xyzxyzxyz.de/remote.php/dav/addressbooks/users/user12345/contacts/19F60500-5A33-412D-A9D2-6365717D473D.vcf","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/apps/dav/lib/Server.php",“line”:319,“function”:“exec”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[]},{“file”:"/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/apps/dav/appinfo/v2/remote.php",“line”:35,“function”:“exec”,“class”:“OCA\DAV\Server”,“type”:"->",“args”:[]},{“file”:"/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/remote.php",“line”:165,“args”:["/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/apps/dav/appinfo/v2/remote.php"],“function”:“require_once”}],“File”:"/home/xyzxyzxyz/domains/owncloud.xyzxyzxyz.de/public_html/apps/dav/lib/CardDAV/CardDavBackend.php",“Line”:628,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0”,“version”:“18.0.0.10”,“id”:“5e316cc716ace”}

I have the exactly the same problem. When I want to change anything on a new added contact, the circle in top runs endless. I’m using nextcoud 18.0.0 on PHP 7.2. The logfile shows me this:

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

  1. [my_webspace]/3rdparty/sabre/dav/lib/CardDAV/AddressBook.php line 144
    OCA\DAV\CardDAV\CardDavBackend->createCard(“2”, “AAE6E589-8573-4 … f”, “BEGIN:VCARD\r\n … D”)
  2. [my_webspace]/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
    Sabre\CardDAV\AddressBook->createFile(“AAE6E589-8573-4 … f”, “BEGIN:VCARD\r\n … D”)
  3. [my_webspace]/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
    Sabre\DAV\Server->createFile(“addressbooks/us … f”, “BEGIN:VCARD\r\n … D”, null)
  4. <>
    Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Reque … "}, Sabre\HTTP\Response {})
  5. [my_webspace]/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    call_user_func_array([Sabre\DAV\CorePlugin {},“httpPut”], [Sabre\HTTP\Requ … }])
  6. [my_webspace]/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit(“method:PUT”, [Sabre\HTTP\Requ … }])
  7. [my_webspace]/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque … "}, Sabre\HTTP\Response {})
  8. [my_webspace]/apps/dav/lib/Server.php line 319
    Sabre\DAV\Server->exec()
  9. [my_webspace]/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  10. [my_webspace]/remote.php line 165
    require_once("/www/htdocs/[account] … p")

What can I do, to solve these problem?

Sabre\DAV\Exception\BadRequest: VCard object with uid already exists in this addressbook collection.

Same for me, after update :frowning:

maybe it’s the same as described here?

Hi!
The nextcloud update is not at cause here, the protocol did not changed.
But there is an opened issue about it https://github.com/nextcloud/contacts/issues/1453
Let’s discuss this here please :slight_smile:

1 Like