Thank you for posting their answer here, it is interesting! Hopefully Synology can improve it in the future, which would be very nice and brings users a nice workflow.
caldav not working for nextcloud personal calendar
-
I have a nextcloud instance running the included calendar app which has been working fine until lately. I can not sync the “Personal” calendar, which is the default calendar created by the app. I can however sync everything else, including newly created calendars with different caldav urls. Contact sync also works fine. davx5 reports a 404 with the following debug information below followed by server logs from the app and nginx. All nextcloud self checks pass and dav redirects are configured correctly (considering other calendars work fine). Has anyone experienced a similar issue? I thought this would be a good place to start but will probably open an issue with nextcloud as well.
I’m running nextcloud version 18.0.1.
--- BEGIN DEBUG INFO --- SYNCHRONIZATION INFO Account name: email@myserver.com Authority: com.android.calendar HTTP REQUEST: Request{method=REPORT, url=https://myserver.com/remote.php/dav/calendars/user.name/personal/, tags={}} <?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="20191121T035347Z" /></CAL:comp-filter></CAL:comp-filter></CAL:filter></CAL:calendar-query> HTTP RESPONSE: Response{protocol=h2, code=404, message=, url=https://myserver.com/remote.php/dav/calendars/user.name/personal/} <?xml version="1.0" encoding="utf-8"?> <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> <s:exception>Sabre\DAV\Exception\NotFound</s:exception> <s:message>Calendar object not found</s:message> </d:error> REMOTE RESOURCE: https://myserver.com/remote.php/dav/calendars/user.name/personal/ EXCEPTION: at.bitfire.dav4jvm.exception.NotFoundException: HTTP 404 at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:356) at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:338) at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:432) at at.bitfire.dav4jvm.DavCalendar.calendarQuery(DavCalendar.kt:99) at at.bitfire.davdroid.syncadapter.CalendarSyncManager$listAllRemote$2.invoke(CalendarSyncManager.kt:110) at at.bitfire.davdroid.syncadapter.CalendarSyncManager$listAllRemote$2.invoke(CalendarSyncManager.kt:44) at at.bitfire.davdroid.syncadapter.SyncManager.useRemote(SyncManager.kt:828) at at.bitfire.davdroid.syncadapter.SyncManager.useRemoteCollection(SyncManager.kt:849) at at.bitfire.davdroid.syncadapter.CalendarSyncManager.listAllRemote(CalendarSyncManager.kt:108) at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1$1.invoke(SyncManager.kt:157) at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1$1.invoke(SyncManager.kt:57) at at.bitfire.davdroid.syncadapter.SyncManager.syncRemote(SyncManager.kt:474) at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1.invoke(SyncManager.kt:156) at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1.invoke(SyncManager.kt:57) at at.bitfire.davdroid.syncadapter.SyncManager.unwrapExceptions(SyncManager.kt:854) at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.kt:116) at at.bitfire.davdroid.syncadapter.CalendarsSyncAdapterService$CalendarsSyncAdapter.sync(CalendarsSyncAdapterService.kt:61) at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:122) at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:334) SOFTWARE INFORMATION * at.bitfire.davdroid 2.6.3.1-ose (329) from org.fdroid.fdroid.privileged * org.dmfs.tasks 1.2.4 (78500) from org.fdroid.fdroid.privileged * com.android.providers.contacts 9 (28) * com.android.providers.calendar 9 (28) * com.android.contacts 1.7.31 (10731) * com.android.calendar 9 (28) CONNECTIVITY (at the moment) - [ Transports: CELLULAR Capabilities: MMS&SUPL&IA&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&NOT_CONGESTED&NOT_SUSPENDED Unwanted: LinkUpBandwidth>=51200Kbps LinkDnBandwidth>=102400Kbps Specifier: <1>] - [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED Unwanted: LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -38] CONFIGURATION Power saving disabled: yes Notifications (not blocked): [group] sync isBlocked=false syncProblems: importance=3 syncIoErrors: importance=1 syncWarnings: importance=2 cert4android: importance=3 general: importance=3 debug: importance=4 Permissions: READ_CONTACTS: granted WRITE_CONTACTS: granted READ_CALENDAR: granted WRITE_CALENDAR: granted READ_TASKS: granted WRITE_TASKS: granted ACCESS_COARSE_LOCATION: denied System-wide synchronization: automatically ACCOUNTS Account: email@myserver.com Address book sync. interval: 240 min Calendar sync. interval: 240 min OpenTasks sync. interval: 240 min WiFi only: false [CardDAV] Contact group method: GROUP_VCARDS [CalDAV] Time range (past days): 90 Manage calendar colors: true Use event colors: false Address book account: Contacts (email@myserver.com /Q) Main account: Account {name=email@myserver.com, type=bitfire.at.davdroid} URL: https://myserver.com/remote.php/dav/addressbooks/users/user.name/contacts/ Sync automatically: true SQLITE DUMP android_metadata | locale | | en_US | ---------- room_master_table | id | identity_hash | | 42 | $$$$$$$$$id_hash_hash$$$$$$$$ | ---------- service | id | accountName | type | principal | | 3 | email@myserver.com | carddav | https://myserver.com/remote.php/dav/principals/users/user.name/ | | 4 | email@myserver.com | caldav | https://myserver.com/remote.php/dav/principals/users/user.name/ | ---------- sqlite_sequence | name | seq | | service | 4 | | homeset | 4 | | collection | 11 | ---------- homeset | id | serviceId | url | privBind | displayName | | 3 | 4 | https://myserver.com/remote.php/dav/calendars/user.name/ | 1 | <null> | | 4 | 3 | https://myserver.com/remote.php/dav/addressbooks/users/user.name/ | 1 | <null> | ---------- collection | id | serviceId | type | url | privWriteContent | privUnbind | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | supportsVJOURNAL | source | sync | | 6 | 4 | CALENDAR | https://myserver.com/remote.php/dav/calendars/user.name/contact_birthdays/ | 0 | 0 | 0 | Contact birthdays | <null> | -54 | <null> | 1 | 0 | 0 | <null> | 0 | | 7 | 4 | CALENDAR | https://myserver.com/remote.php/dav/calendars/user.name/personal/ | 1 | 1 | 0 | Personal | <null> | -9139225 | <null> | 1 | 1 | 0 | <null> | 1 | | 8 | 4 | WEBCAL | https://myserver.com/remote.php/dav/calendars/user.name/calendar/ | 1 | 1 | 0 | work_o365 | <null> | -926896 | <null> | 1 | <null> | <null> | https://outlook.office365.com/owa/calendar/<calid>@company.com/<calid>/calendar.ics | 1 | | 9 | 3 | ADDRESS_BOOK | https://myserver.com/remote.php/dav/addressbooks/users/user.name/contacts/ | 1 | 1 | 0 | Contacts | <null> | <null> | <null> | <null> | <null> | <null> | <null> | 1 | | 10 | 4 | CALENDAR | https://myserver.com/remote.php/dav/calendars/user.name/test/ | 1 | 1 | 0 | test | <null> | -11953502 | <null> | 1 | 0 | 0 | <null> | 0 | | 11 | 4 | CALENDAR | https://myserver.com/remote.php/dav/calendars/user.name/testtasks/ | 1 | 1 | 0 | testtasks | <null> | -9525617 | <null> | 1 | 1 | 0 | <null> | 0 | ---------- SYSTEM INFORMATION Android version: 9 (lineage_klte-userdebug 9 PQ3A.190801.002 eng.root.20200212.101449 dev-keys) Device: samsung SM-G900F (klte) --- END DEBUG INFO ---
application and web logs for failed sync:
app_1 | 172.18.0.5 - user.name 19/Feb/2020:04:04:07 +0000 "REPORT /remote.php" 404 web_1 | 172.19.0.1 - user.name [19/Feb/2020:04:04:07 +0000] "REPORT /remote.php/dav/calendars/user.name/personal/ HTTP/1.1" 404 187 "-" "DAVx5/2.6.3.1-ose (2020/01/18; dav4jvm; okhttp/3.12.6) Android/9" "172.19.0.1" proxy_1 | nginx.1 | myserver.com 172.19.0.1 - user.name [19/Feb/2020:04:04:07 +0000] "REPORT /remote.php/dav/calendars/user.name/personal/ HTTP/2.0" 404 176 "-" "DAVx5/2.6.3.1-ose (2020/01/18; dav4jvm; okhttp/3.12.6) Android/9"
application and web logs for a sucessful one:
web_1 | 172.19.0.1 - user.name [19/Feb/2020:04:09:06 +0000] "PROPFIND /remote.php/dav/calendars/user.name/testtasks/ HTTP/1.1" 207 536 "-" "DAVx5/2.6.3.1-ose (2020/01/18; dav4jvm; okhttp/3.12.6) Android/9" "172.19.0.1" proxy_1 | nginx.1 | myserver.com 172.19.0.1 - user.name [19/Feb/2020:04:09:06 +0000] "PROPFIND /remote.php/dav/calendars/user.name/testtasks/ HTTP/2.0" 207 524 "-" "DAVx5/2.6.3.1-ose (2020/01/18; dav4jvm; okhttp/3.12.6) Android/9" app_1 | 172.18.0.5 - user.name 19/Feb/2020:04:09:05 +0000 "PROPFIND /remote.php" 207 app_1 | 172.18.0.5 - user.name 19/Feb/2020:04:09:05 +0000 "PROPFIND /remote.php" 207 web_1 | 172.19.0.1 - user.name [19/Feb/2020:04:09:06 +0000] "PROPFIND /remote.php/dav/calendars/user.name/calendar/ HTTP/1.1" 207 1123 "-" "DAVx5/2.6.3.1-ose (2020/01/18; dav4jvm; okhttp/3.12.6) Android/9" "172.19.0.1" proxy_1 | nginx.1 | myserver.com 172.19.0.1 - user.name [19/Feb/2020:04:09:06 +0000] "PROPFIND /remote.php/dav/calendars/user.name/calendar/ HTTP/2.0" 207 1111 "-" "DAVx5/2.6.3.1-ose (2020/01/18; dav4jvm; okhttp/3.12.6) Android/9" app_1 | 172.18.0.5 - user.name 19/Feb/2020:04:09:06 +0000 "REPORT /remote.php" 207 proxy_1 | nginx.1 | myserver.com 172.19.0.1 - user.name [19/Feb/2020:04:09:06 +0000] "REPORT /remote.php/dav/calendars/user.name/testtasks/ HTTP/2.0" 207 238 "-" "DAVx5/2.6.3.1-ose (2020/01/18; dav4jvm; okhttp/3.12.6) Android/9" web_1 | 172.19.0.1 - user.name [19/Feb/2020:04:09:06 +0000] "REPORT /remote.php/dav/calendars/user.name/testtasks/ HTTP/1.1" 207 249 "-" "DAVx5/2.6.3.1-ose (2020/01/18; dav4jvm; okhttp/3.12.6) Android/9" "172.19.0.1"
-
Hi,
@zaingeec7o said in caldav not working for nextcloud personal calendar:
I can not sync the “Personal” calendar […] I can however sync everything else, including newly created calendars with different caldav urls.
Sounds like there is a problem with this specific calendar. The error message from Nextcloud says the same:
HTTP REQUEST:
Request{method=REPORT, url=https://myserver.com/remote.php/dav/calendars/user.name/personal/, tags={}}
<?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=“20191121T035347Z” /></CAL:comp-filter></CAL:comp-filter></CAL:filter></CAL:calendar-query>HTTP RESPONSE:
Response{protocol=h2, code=404, message=, url=https://myserver.com/remote.php/dav/calendars/user.name/personal/}
<?xml version=“1.0” encoding=“utf-8”?>
<d:error xmlns:d=“DAV:” xmlns:s=“http://sabredav.org/ns”>
<s:exception>Sabre\DAV\Exception\NotFound</s:exception>
<s:message>Calendar object not found</s:message>
</d:error>This means that when DAVx⁵ asks for events for 20191121T035347Z and newer, Nextcloud returns “404 Calendar object not found”, which sounds as it can’t parse a specific event in this time and then breaks with 404.
So, this seems to be a server problem. There should be more information in the Nextcloud logs.
-
@rfc2822 Thanks for taking a look. 20191121T035347Z is exactly 90 days prior to when the request was made. Davx5 is configured to begin searching for events 90 days prior. I assumedNevermind, I misread your reply. I’ll look for broken events in that range and see what I can find. Thanks for your help.CAL:time-range start=“20191121T035347Z
indicated the start point for that range. Is that not the case?