I just reflashed my Xperia Z3 Tablet, and installed davdroid to sync my contacts, calendars and tasks. But only contacts get synced. Neither tasks or calendar can be fetched from the server. I looked at my Xperia XZ2 Compact, and I got the same error there when i tried to refresh calendar list. The syncing itself works on my XZ2, as the list itself has been fetched before this error apparently occurred.

It might have something to do with the version of my NextCloud installation, as I upgraded it to version 14 a couple of months ago.

This is the error log I get when i try to refresh calendar list;

--- BEGIN DEBUG INFO ---
Account name: NextCloud

HTTP REQUEST:
Request{method=PROPFIND, url=https://michaelryden.se/remote.php/dav/principals/groups/Anv%C3%A4ndare/, tags={}}
<?xml version='1.0' encoding='UTF-8' ?><propfind xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><CAL:calendar-home-set /><n0:calendar-proxy-read-for xmlns:n0="http://calendarserver.org/ns/" /><n1:calendar-proxy-write-for xmlns:n1="http://calendarserver.org/ns/" /><group-membership /></prop></propfind>

HTTP RESPONSE:
Response{protocol=http/1.1, code=500, message=Internal Server Error, url=https://michaelryden.se/remote.php/dav/principals/groups/Anv%C3%A4ndare/}
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>LogicException</s:exception>
  <s:message>This is not supposed to happen</s:message>
</d:error>



EXCEPTION:
at.bitfire.dav4android.exception.HttpException: HTTP 500 Internal Server Error
	at at.bitfire.dav4android.DavResource.checkStatus(DavResource.kt:362)
	at at.bitfire.dav4android.DavResource.checkStatus(DavResource.kt:338)
	at at.bitfire.dav4android.DavResource.processMultiStatus(DavResource.kt:430)
	at at.bitfire.dav4android.DavResource.propfind(DavResource.kt:325)
	at at.bitfire.davdroid.DavService$refreshCollections$1$2.invoke(DavService.kt:243)
	at at.bitfire.davdroid.DavService$refreshCollections$1$2.invoke(DavService.kt:262)
	at at.bitfire.davdroid.DavService$refreshCollections$1$2.invoke$default(DavService.kt:189)
	at at.bitfire.davdroid.DavService.refreshCollections(DavService.kt:299)
	at at.bitfire.davdroid.DavService.access$refreshCollections(DavService.kt:44)
	at at.bitfire.davdroid.DavService$onStartCommand$$inlined$let$lambda$1.invoke(DavService.kt:68)
	at at.bitfire.davdroid.DavService$onStartCommand$$inlined$let$lambda$1.invoke(DavService.kt:44)
	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

SOFTWARE INFORMATION
Package: at.bitfire.davdroid
Version: 2.1-beta1-gplay (246) from 5 okt. 2018
Installed from: com.android.vending
JB Workaround installed: no

CONNECTIVITY (at the moment)
Active connection: WiFi, CONNECTED

CONFIGURATION
Power saving disabled: yes
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: granted
org.dmfs.permission.WRITE_TASKS permission: granted
System-wide synchronization: automatically
Account: NextCloud
  Address book sync. interval: 240 min
  Calendar     sync. interval: 240 min
  OpenTasks    sync. interval: 240 min
  WiFi only: false
  [CardDAV] Contact group method: CATEGORIES
  [CalDAV] Time range (past days): 90
           Manage calendar colors: true
Address book account: Jobbet (NextCloud hg)
  Main account: Account {name=NextCloud, type=bitfire.at.davdroid}
  URL: https://michaelryden.se/remote.php/dav/addressbooks/users/zynex/Jobbet/
  Sync automatically: true
Address book account: Kontakter (NextCloud dw)
  Main account: Account {name=NextCloud, type=bitfire.at.davdroid}
  URL: https://michaelryden.se/remote.php/dav/addressbooks/users/zynex/kontakter/
  Sync automatically: true

SQLITE DUMP
android_metadata
	|  locale |
	|  sv_SE |
----------
services
	|  _id | accountName | service | principal |
	|  7 | NextCloud | carddav | https://michaelryden.se/remote.php/dav/principals/users/zynex/ |
	|  8 | NextCloud | caldav | https://michaelryden.se/remote.php/dav/principals/users/zynex/ |
----------
sqlite_sequence
	|  name | seq |
	|  services | 8 |
	|  homesets | 5 |
	|  collections | 10 |
----------
homesets
	|  _id | serviceID | url |
	|  5 | 7 | https://michaelryden.se/remote.php/dav/addressbooks/users/zynex/ |
----------
collections
	|  _id | serviceID | type | url | privWriteContent | privUnbind | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | source | sync |
	|  9 | 7 | ADDRESS_BOOK | https://michaelryden.se/remote.php/dav/addressbooks/users/zynex/Jobbet/ | 1 | 1 | 0 | Jobbet | <null> | <null> | <null> | 0 | 0 | <null> | 1 |
	|  10 | 7 | ADDRESS_BOOK | https://michaelryden.se/remote.php/dav/addressbooks/users/zynex/kontakter/ | 1 | 1 | 0 | Kontakter | <null> | <null> | <null> | 0 | 0 | <null> | 1 |
----------

SYSTEM INFORMATION
Android version: 8.1.0 (aicp_scorpion_windy-userdebug 8.1.0 OPM2.171026.006.H1 f6695ae140 test-keys)
Device: Sony Xperia Z3 Tablet Compact (Wi-Fi) (scorpion_windy)

--- END DEBUG INFO ---

That’s from the Xperia Z3 Tablet Compact, but I get the same error on my Xperia XZ2 Compact phone now.

– Mike