CardDav Sync issues with Synology since last month

  • Hi,

    I have been recently seeing issues with my Sync that i setup for Synology and DAVx5 to get my Android phones Contacts Synchronized. I have not touched the DAVx5 config prior to the issue and it has been running quietly for Months. About a month ago DAVx5 started throwing me Notifications that an error 500 occurs on the Server side.

    Today after getting pretty much annoyed at all the notifications i have been looking into the issue and observed the following:

    My contact information seemed to be in sync despite the Error and my second sync task for the Calendar with Synology was completely unaffected by the issue. In the hope to resolve the issue i went for a re-setup of the Sync Task.

    After deleting every contact on the phone (and by accident also on the Server 😛 ) i deleted the old account that was used for the Sync between my CardDav Server and the phone. The new account has been setup the same way with the recommended settings found in the proven solutions part.

    I then found out that the initial sync is working and the phone receives all Contacts but any following sync is receiving the below error:

    Account: Account {name=addressbook (CardDav@Synology +Q), type=at.bitfire.davdroid.address_book}
    at.bitfire.dav4jvm.exception.HttpException: HTTP 500 Internal Server Error
    	at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:6)
    	at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:3)
    	at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:1)
    	at at.bitfire.dav4jvm.DavAddressBook.multiget(DavAddressBook.kt:10)
    	at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1.invoke(ContactsSyncManager.kt:2)
    	at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1.invoke(ContactsSyncManager.kt:1)
    	at at.bitfire.davdroid.syncadapter.SyncManager.remoteExceptionContext(SyncManager.kt:1)
    	at at.bitfire.davdroid.syncadapter.SyncManager.remoteExceptionContext(SyncManager.kt:9)
    	at at.bitfire.davdroid.syncadapter.ContactsSyncManager.downloadRemote(ContactsSyncManager.kt:2)
    	at at.bitfire.davdroid.syncadapter.SyncManager$syncRemote$1$1$1.invokeSuspend(SyncManager.kt:2)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(
    	at java.util.concurrent.ThreadPoolExecutor$
    Request{method=REPORT, url=https://xxxxxxx:8443/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/, headers=[Depth:0, Accept-Encoding:br,gzip]}
    <?xml version='1.0' encoding='UTF-8' ?><CARD:addressbook-multiget xmlns="DAV:" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><getcontenttype /><getetag /><CARD:address-data /></prop><href>/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/b771549b-8717-4164-a2cf-648cfe87781b.vcf</href><href>/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/ac3e8046-23eb-4672-a949-82926a2cf55c.vcf</href><href>/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/afba61f7-7269-4d50-82e5-296b3d45a772.vcf</href><href>/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/b99ccb68-58f8-4c0b-ab69-fc2ddcd3592b.vcf</href><href>/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/cbf38879-4bd3-4a67-ada1-e55ce9da48b0.vcf</href><href>/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/b890f468-1b23-4610-bf60-23c288307af9.vcf</href><href>/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/b8c2a16c-7214-4b07-a168-d50c7a750e2c.vcf</href><href>/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/cc5cfc91-70c4-4598-991e-0df9a304d8b6.vcf</href><href>/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/d051d9e3-333e-497c-ac95-df016dee243e.vcf</href><href>/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/ce53342a-75f5-429f-9f4e-5962f1a38bc5.vcf</href></CARD:addressbook-multiget>
    HTTP RESPONSEResponse{protocol=http/1.1, code=500, message=Internal Server Error, url=https://xxxxxxx:8443/addressbooks/__uids__/BB91E43E-E148-5A53-9757-57EE6D9FBB3C/addressbook/}
    <html><head><title>Internal Server Error</title></head><body><h1>Internal Server Error</h1>An error occurred rendering the requested page. More information is available in the server log.</body></html>
    // i have been removing the domain information in the above output

    This was partly the issue why i ended up deleting all contacts from my server as i thought that the Sync was broken but it managed to get everything deleted from the server when deleting them on the phone.

    Can someone tell me whats going on here ?

    Thanks in Advance.


  • developer


    This is a known Synology problem if you

    1. export your Contacts from Android to a .vcf,
    2. import this .vcf directly to Synology CardDAV server.

    Did you do that?

  • Hi,

    thanks for the quick reply.

    I have been doing the following now:

    • exporting contacts from Phone
    • deleting them on phone / Synology
    • loading backup on Synology
    • syncing the phone with Synology

    The issue seems to be the same - the first sync is working all following ones receive error 500…

    Was that the right way to do it ?

  • developer


    You’d have to

    1. export contacts on the phone
    2. delete the address book on Synology,
    3. create a new empty address book,
    4. sync it with DAVx5,
    5. import contacts into the DAVx5 account on the phone again.


    Please note the 500 Internal server error is a Synology problem and not a DAVx5 problem. We can’t do anything against it.

  • Hi again,

    i have been trying that as well now - however i am still not sure about the exact details and order.

    delete the address book on Synology,
    ( The CardDav Server is creating one Addressbook per user - i am admin and therefore i cannot just delete the addressbook in question)

    create a new empty address book,
    I assume that this should be done on the phone as the Synology would also not allow me to do that.
    And when we speak about phone do you mean in the contacts app or the DAVx5 ( the last one i tried with below result)

    Here is what i have been doing:

    • deleting the contacts from phone again
    • deleting the contacts from CardDav Server
    • Attempting to import the contacts.vcf from phone into DAVx5 Account (Phone)
    • This did not work (no specific error - just cant be imported presented by Android)

    • deleted the DAVx5 addressbook on the phone via DAVx5 App
    • Attempting to create new Addressbook via DAVx5 in App - does not work with an error 403 Forbidden

    Can you specify exactly where each action has to be performed ?

    Thanks in Advance.

    Ok never mind the above 🙂 - the import that showed me not possible before worked now - the downloaded file was empty - i could retrieve it though. The issue was resolved exactly as you told me… I have to document that for myself in case that it will happen again.

    Thanks a lot for the quick help and replies…
    Really enjoying the app so far- keep up the good work.

    Thanks a lot again

Similar topics