Hi to you all,
Since a few days I bumped into a problem while using DavDroid.
Problem: DavDroid raises synchronization error. (Server error while listing remote data)
Short description after doing some research:
When the calendar on the WebDav server does not contain any calendar entries within the sync period and there are no changes on the DavDroid client, DavDroid raises a sync error. Possible calendar entries in the DavDroid client calendar are not removed.
Example:
There is one calendar entry within the synchronization period (in my case 90 days). The server and client are in sync. When I remove that single entry from the server with the calendar application on my PC, the DavDroid client raises a sync error and the DavDroid client does not sync that calendar with the server.
Sync behavior can be restored by either creating a new calendar entry on the server within the sync period or on the DavDroid client (or by extending the synchronization period so that it contains at least one calendar entry).
Questions:
Is this normal/intended behavior?
Is there a setting I did not see?
Is there a way to solve this without extending the synchronization period and without disabling the synchronization of the failing calendar?
Setup:
- Synology WebDav server
o WebDav server hosts 7 different calendars
o WebDav version 2.3.3-0024
- Mobile device: Samsung S4 Mini (2 models with different OS versions)
- DavDroid 1.6.5 ose ( and previous versions)
o DavDroid config is below in the debug info
- PC using Thunderbird with Lightning (5.4.1.1)
Behavior/ replay:
- DavDroid synced always without errors.
- At a certain point in time the sync error was raised while syncing phone calendars (on both phones) with server calendars.
- Upgrade to newer DavDroid version (1.6.5).
- Error persisted.
- Error message is always and only about the calendar called “Pap”.
o most recent entry in this calendar is “old”: 10 may 2017.
o Other calendars (6) sync like a charm.
- Disabled sync for “Pap” calendar.
- Trigger sync on phone
o Error is not raised.
- Enabled sync for “Pap”.
- Trigger sync on phone
o Error is raised.
- Created a new entry (A) for “Pap” in Thunderbird (on server)
- Trigger sync on phone
o Sync error on phone is not raised!!!
o Entry (A) appears in phone calendar.
- Removed the newly created entry in Thunderbird (from server)
- Trigger sync on phone
o Sync error is raised!!!
o Entry (A) is not removed from phone calendar.
- Create new entry (B) in phone in “Pap”.
- Trigger sync on phone
o No error raised.
o New entry (B) appears on server
o Entry (A) previously removed from server which refused to be removed from phone is now deleted from phone.
- Remove latest new (B) entry from server (which was created on the phone)
- Trigger sync on phone
o Error is raised
o Entry (B) is not removed from phone calendar.
- Changed sync period to 120 days. (Contains old calendar entries)
- Trigger sync on phone
o Error is not raised.
o Entry (B) is removed from client.
o Syncing is restored to creating and deleting new entries.
- Changed sync period back to 90 days.
- Trigger sync on phone
o Error is raised when server contains no entries.
o Behavior like above is restored.
--- BEGIN DEBUG INFO ---
SYNCHRONIZATION INFO
Synchronization phase: 7
Account name: Peter's Agenda's
Authority: com.android.calendar
HTTP REQUEST:
REPORT /web/Pap/
depth: 1
Content-Type: application/xml; charset=utf-8
Content-Length: 328
<?xml version='1.0' encoding='UTF-8' ?><CAL:calendar-query xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav"><prop><getetag /></prop><CAL:filter><CAL:comp-filter name="VCALENDAR"><CAL:comp-filter name="VEVENT"><CAL:time-range start="20170526T113501Z" /></CAL:comp-filter></CAL:comp-filter></CAL:filter></CAL:calendar-query>
HTTP RESPONSE:
http/1.1 404 Not Found
cache-control: no-cache
connection: Keep-Alive
content-length: 0
content-type: httpd/unix-directory
date: Thu, 24 Aug 2017 09:48:28 GMT
keep-alive: timeout=5, max=86
server: Apache
Content-Type: httpd/unix-directory
Content-Length: 0
REMOTE RESOURCE:
http://agenda.peterthuis:5005/web/Pap/
EXCEPTION:
at.bitfire.dav4android.exception.NotFoundException: 404 Not Found
at at.bitfire.dav4android.DavResource.checkStatus(DavResource.kt:323)
at at.bitfire.dav4android.DavResource.checkStatus(DavResource.kt:295)
at at.bitfire.dav4android.DavCalendar.calendarQuery(DavCalendar.kt:89)
at at.bitfire.davdroid.syncadapter.CalendarSyncManager.listRemote(CalendarSyncManager.kt:109)
at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.kt:144)
at at.bitfire.davdroid.syncadapter.CalendarsSyncAdapterService$SyncAdapter.sync(CalendarsSyncAdapterService.kt:49)
at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:48)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)
SOFTWARE INFORMATION
Package: at.bitfire.davdroid
Version: 1.6.5-ose (160) from 8 aug. 2017
Installed from: APK (directly)
JB Workaround installed: no
CONNECTIVITY (at the moment)
Active connection: WiFi, CONNECTED
CONFIGURATION
android.permission.READ_CONTACTS permission: granted
android.permission.WRITE_CONTACTS permission: granted
android.permission.READ_CALENDAR permission: granted
android.permission.WRITE_CALENDAR permission: granted
org.dmfs.permission.READ_TASKS permission: denied
org.dmfs.permission.WRITE_TASKS permission: denied
System-wide synchronization: manually
Account: Peter's Agenda's
Address book sync. interval: —
Calendar sync. interval: 60 min
OpenTasks sync. interval: —
WiFi only: true, SSID: ghostsarenice5
[CardDAV] Contact group method: GROUP_VCARDS
[CalDAV] Time range (past days): 90
Manage calendar colors: false
SQLITE DUMP
android_metadata
| locale |
| nl_NL |
----------
settings
| setting | value |
| overrideProxy | 0 |
| hint_OpenTasksNotInstalled | 0 |
| logToExternalStorage | 1 |
----------
services
| _id | accountName | service | principal |
| 9 | Peter's Agenda's | caldav | <null> |
----------
sqlite_sequence
| name | seq |
| services | 9 |
| homesets | 21 |
| collections | 38 |
----------
homesets
| _id | serviceID | url |
| 21 | 9 | http://agenda.peterthuis:5005/web/ |
----------
collections
| _id | serviceID | url | readOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | sync |
| 32 | 9 | http://agenda.peterthuis:5005/web/Algemeen/ | 0 | <null> | <null> | <null> | <null> | 1 | 1 | 1 |
| 33 | 9 | http://agenda.peterthuis:5005/web/Bijzonder/ | 0 | <null> | <null> | <null> | <null> | 1 | 1 | 1 |
| 34 | 9 | http://agenda.peterthuis:5005/web/Doortje/ | 0 | <null> | <null> | <null> | <null> | 1 | 1 | 1 |
| 35 | 9 | http://agenda.peterthuis:5005/web/Pap/ | 0 | <null> | <null> | <null> | <null> | 1 | 1 | 1 |
| 36 | 9 | http://agenda.peterthuis:5005/web/Sport/ | 0 | <null> | <null> | <null> | <null> | 1 | 1 | 1 |
| 37 | 9 | http://agenda.peterthuis:5005/web/UWV/ | 0 | <null> | <null> | <null> | <null> | 1 | 1 | 1 |
| 38 | 9 | http://agenda.peterthuis:5005/web/Werk_Zoeken/ | 0 | <null> | <null> | <null> | <null> | 1 | 1 | 1 |
----------
SYSTEM INFORMATION
Android version: 4.4.2 (KOT49H.I9195XXUCOE4)
Device: samsung GT-I9195 (serranolte)
--- END DEBUG INFO ---