CalDAV not syncing to NextCloud
-
Hello,
i have troubles syncing clients (Win10 calendar, iPhone calendar) via z-push to nextcloud.
After creating the account on the mobile i get all calendar items. I can create a new item on mobile an it syncs to Nextcloud. Everything fine so far.
But if I change an existing item on mobile or Win10 I get an error:StatusException: ImportChangesDiff->ImportMessageChange('Nextcloud-ZBROVM41LRQ6Y6EA9FCSNR.ics','SyncAppointment'): Conflict detected. Data from PIM will be dropped! Server overwrites PIM. User is informed. - code: 7 - file: /usr/share/z-push/lib/default/diffbackend/importchangesdiff.php:89
and the changes from mobile are not synced to Nextcloud but the item on mobile is reset to the item from Nextcloud.
How can this be solved?
Thanks for your help.Tobias
-
It seems as Z-Push is still exporting (sending) items to your phone. The appointment you are trying to modify is also in the list of items that is sent from Nextcould to your client. As “server overwrites PIM” is configured, your server “wins” and the changes from the mobile are dropped.
Can you provide a full WBXML log? Ideally, re-setup the account entirely and let it sync until all items are on the phone again. Then you try to modify anything and send the log. This can be quite a lot of data, you should also redact the log.
More information on how to generate this log is here: https://wiki.z-hub.io/display/ZP/Debugging
Cheers,
Seb -
Hello,
first thank you for watching my log.
Find the full log for this user “tko” here: http://paste.ubuntu.com/p/Cr8MVhrhc9/
Everything was synced then I started a new user.log.
I changed an item on mobile (from “test20180227” to “test20180227äöü”). The iPhone synced and the changes were overwritten with the old data from nextcloud immediately…Thanks.
Tobias
-
So, the problem is this line:
ExportChangesDiff->InitializeExporter(): Found '2' changes for 'C01EB05D5-7295-4A17-AF80-56505AD599A8'
It says that there are two messages that should be synchronized from the server to the phone.
How does this line look when you hit the “sync/refresh” button on the phone? When everything is synchronized it should say 0 changes here. -
Next try - new user.log: https://paste.ubuntu.com/p/T8mz2XfxZQ/
Synced my phone calendar and the line “ExportChangesDiff->…” is there 4 times:Line 28: ExportChangesDiff->InitializeExporter(): Initializing folder diff engine .... Line 39: ExportChangesDiff->InitializeExporter(): Found '0' changes for 'hierarchy' .... Line 128: ExportChangesDiff->InitializeExporter(): Initializing folder diff engine ... Line 139: ExportChangesDiff->InitializeExporter(): Found '0' changes for 'hierarchy'
Seems ok.
Then again modified the item to “test20180227äöü” on the phone.
The next log entries are again:Line 259: ExportChangesDiff->InitializeExporter(): Initializing message diff engine. '13' messages in state ... Line 274: ExportChangesDiff->InitializeExporter(): Found '2' changes for 'C01EB05D5-7295-4A17-AF80-56505AD599A8'
And the item on the phone is set back to “test20180227” from nextcloud.
What went wrong?Further tests and another new log: https://paste.ubuntu.com/p/2TCg8KgPYs/
-
added new Item on the phone with subject “Test3” (around 18:58 in the log)
-
synced phone (around 19:04/19:05 in the log)
-
modified the item from subject “Test3” to “Test4” on the phone (around 19:07 in the log)
-
synced phone (around 19:08)
Everything seems ok. -
modified item in Webapp to subject “Test5” (19:09:48 in the log)
-
phone was almost immediately “Test5” but snyced again (19:10:43)
-
modified item on phone to “Test6” (19:11:41)
Everything seems ok. -
added new item “Test7” in webapp, synced to phone (19:13:15 in the log) - ok
-
logged off from webapp
-
altered to “Test8” on the phone, seems ok but after login to nextcloud webapp the item is still “Test7” (19:13:50)
-
tried several times to sync phone but again on phone “Test8” in nextcloud webapp “Test7” (till 19:24:14) - why???
-
after browser (Firefox) restart and new login to nextcloud webapp - again “Test7” in nextcloud
-
modified item in nextcloud from “Test7” to “Test9” (19:27)
-
tried to sync phone - still “Test8” on phone (till 19:32)
-
closed browser, phone standby till no open connection in z-push-top (19:42:44)
-
tried to sync phone - still “Test8” on phone (till 19:46:42)
-
login to nextcloud webapp still “Test9” in nextcloud
Sorry for the very long post - but i cannot explain this behavior. It seems completely out of sync…
Have you any hints for me where to look or what to do?Thanks.
Tobias.
-
-
Hello Tobias,
@toko said in CalDAV not syncing to NextCloud:
- added new item “Test7” in webapp, synced to phone (19:13:15 in the log) - ok
- logged off from webapp
- altered to “Test8” on the phone, seems ok but after login to nextcloud webapp the item is still “Test7” (19:13:50)
That change is rejected by Z-Push as conflicting and the server wins (Sync response status 7 at 19:13:51, line 3170). There’s also “Found ‘1’ changes for ‘C01EB05D5-7295-4A17-AF80-56505AD599A8’” (line 3148).
- tried several times to sync phone but again on phone “Test8” in nextcloud webapp “Test7” (till 19:24:14) - why???
- after browser (Firefox) restart and new login to nextcloud webapp - again “Test7” in nextcloud
- modified item in nextcloud from “Test7” to “Test9” (19:27)
However there’s no “Test9” occurrence in the log, so for some reason the server doesn’t send that change. Or the backend doesn’t recognise the change as such.
Sorry for the very long post - but i cannot explain this behavior. It seems completely out of sync…
Have you any hints for me where to look or what to do?The CalDAV backend was a community contribution and I’m not familiar with its internal specifics. You could try
z-push-admin -a clearloop -u tko -d je1o53g5592fpe65a65j0gn28g
as the loop detection seems also to kick in.
Manfred