cardDAV sync breaks on REPORT request

Originator:joost.dekeijzer
Number:rdar://46163430 Date Originated:
Status:Duplicate: Open Resolved:
Product:macOS + SDK Product Version:
Classification: Reproducible:
 
Area:
Contacts

Summary:
Using macOS Mojave Contacts with a cardDAV server (ownCloud), the sync breaks after the first time.

Steps to Reproduce:
add cardDAV account to Contacts. First sync (from server to client) works, any sync after this breaks.

Contacts seems to use an UUID as sync-token which does not seem related to any of the UUID's found in the vCards.
The specs https://tools.ietf.org/html/rfc6578#section-4 require the sync token to be a valid URI and also requires the server to be in charge of the tokens. ownCloud uses a format eg: <D:sync-token>http://sabre.io/ns/sync/2285</D:sync-token>


Expected Results:
Synced contacts

Actual Results:
No sync.


Debugging my ownCloud installation, the REPORT request from Contacts has the following body:

<?xml version="1.0" encoding="UTF-8"?>
<A:sync-collection xmlns:A="DAV:">
  <A:sync-token>b905a5fd-ce23-4190-9be3-236969d071a8</A:sync-token>
  <A:sync-level>1</A:sync-level>
  <A:prop>
    <A:getetag/>
  </A:prop>
</A:sync-collection>

Any other sync agent uses (eg):

<?xml version="1.0" encoding="utf-8" ?>
<D:sync-collection xmlns:D="DAV:">
<D:sync-token>http://sabre.io/ns/sync/2285</D:sync-token>
<D:sync-level>1</D:sync-level>
<D:prop>
<D:getcontenttype />
<D:getetag />
</D:prop>
</D:sync-collection>


More information:
https://github.com/owncloud/core/issues/30820
https://central.owncloud.org/t/owncloud-10-0-9-mac-os-x-10-13-6-high-sierra-problem-sync-contacts-carddav-v/15621

Maybe related: https://github.com/owncloud/calendar/issues/959

Comments

Duplicate of 42566961

An Apple engineer responded that my ticket is a duplicate of 42566961. For privacy reasons there is no access to that ticket. Status will be reported back to me.

By joost.dekeijzer at Nov. 30, 2018, 9:18 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!