-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Carddav always returns a 403 saying sync token is invalid or unknown #30820
Comments
GitMate.io thinks possibly related issues are #10783 (CardDAV Sync: Sabre\DAV\Exception: Invalid result from updateProperties), #18409 (PROPPATCH returns 403), #16541 (Contact sync CardDAV issues), and #27920 (Home folder unavailable after upgrade til version 10). |
Same here. Client is macos 10.13.4 Contacts app. |
Have same problem (?) with owncloud 10.0.10 |
Same sync problem and error on macOS Mojave (10.14.1) and ownCloud 10.0.10 syncing cardDAV with Contacts app. |
In my setup, the error is generated here: With modified logging, I see that |
After removing & adding the account (through macOS System Preferences > Accounts > cardDAV) the following happens in the logfile (debug level 0)
After first successful sync, the sync does not work anymore! Even after changing a contact in ownCloud contacts, those changes are not synced to macOS Contacts. I hope this helps... |
Ok, final results of my research of today: On macOS Mojave (10.14) the sync system issues the following for the REPORT http request:
The cardDAV sync agent on my Android phone issues the following (which is supported)
So it seems in Mojave Apple has changed the way it requests REPORT statements and thus breaks the sync? |
@joostdekeijzer It's the same with CalDav |
I found out several weeks ago that Apple doesn't send credentials when using http |
Are you guys using http or https? |
I'm using https. I used https://central.owncloud.org/t/owncloud-9-1-1-1-2-macos-sierra-carddav-not-working-solved/3481/18 to setup the account. Since I really wanted the sync to work, I hacked my own system as follows:
ownCloud now just outputs the full REPORT and the contacts app syncs correctly (as far as I have tested it with ownCloud, macOS and my Android phone). |
Ok. That seems to work fine though on macOS 10.14 Mojave. Do you have sync issues? |
This is the issue - no idea where Apple is taking the sync token from. Sync tokens are generated by us(sabre dav) in the format <D:sync-token>http://sabre.io/ns/sync/2285</D:sync-token> Any other synctoken cannot be used by us. As per https://tools.ietf.org/html/rfc6578#section-4 the sync token has to be a valid URI and has to be used as returned in the sync collection. Afaik we never return a sync token in this format. This should be reported to Apple afaik |
Just filed a bug report with Apple (#46163430) referencing this post. |
Awesome - thanks a lot! Please keep us in the loop so that we can find a solution together. THX |
@joostdekeijzer Is it possible for you to duplicate your issue on openradar so we can see what's happening? Thanks in advance! |
@Julian1998 you mean http://openradar.appspot.com/ ? |
@joostdekeijzer Exactly! |
The issue was marked "Duplicate" by Apple of issue 42566961. I don't have/get access to that issue but apparently they will update my ticket with the status of the original. |
@joostdekeijzer Thanks for sharing infos! |
Is this bug already fixed? In openradar is this bug still open. |
My ticket with Apple is also still open. No real hopes this will change btw. |
Already searched and found no answer. Spotted this line in the log multiple times over again:
{"reqId":"FHyGsrrc72LGHjvRvnwY","level":4,"time":"2018-03-19T20:34:08+00:00","remoteAddr":"113.197.65.22","user":"michael.heuberger","app":"carddav","method":"REPORT","url":"\/remote.php\/carddav\/addressbooks\/michael.heuberger\/contacts\/","message":"Exception: {\"Message\":\"HTTP\\\/1.1 403 Invalid or unknown sync token\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\InvalidSyncToken\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Sync\\\/Plugin.php(65): Sabre\\\\DAV\\\\Sync\\\\Plugin->syncCollection('addressbooks\\\/mi...', Object(Sabre\\\\DAV\\\\Xml\\\\Request\\\\SyncCollectionReport))\\n#1 [internal function]: Sabre\\\\DAV\\\\Sync\\\\Plugin->Sabre\\\\DAV\\\\Sync\\\\{closure}('{DAV:}sync-coll...', Object(Sabre\\\\DAV\\\\Xml\\\\Request\\\\SyncCollectionReport), 'addressbooks\\\/mi...')\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Object(Closure), Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(718): Sabre\\\\Event\\\\EventEmitter->emit('report', Array)\\n#4 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpReport(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:REPORT', Array)\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#8 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/carddav.php(85): Sabre\\\\DAV\\\\Server->exec()\\n#9 \\\/var\\\/www\\\/owncloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#10 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Sync\\\/Plugin.php\",\"Line\":123,\"User\":\"michael.heuberger\"}"}
My server config
config_report_20180319 (1).json.txt
Any clues what this could be?
The text was updated successfully, but these errors were encountered: