How to debug DAVx⁵-related problems

At first, please make sure that you

  1. are using the latest DAVx⁵ version and the latest version of your server software,
  2. have browsed through the DAVx⁵ FAQ, where the most common problems and their solutions are listed,
  3. have looked at our Tested services page for your server.

If you're still experiencing problems with the latest DAVx⁵ version, you can use the "verbose logging" function (DAVx⁵ / Settings / Verbose logging, see screenshot). It writes information about the whole synchronization (including which resources have been found locally and on the server and how they have been processed) to a log file which can be shared to other apps like email or, for instance, Share via HTTP.

Useful information can often be found in the server logs, too (Web server logs and especially application server logs, e.g. Nextcloud logs). If you don't have access to your server logs and/or you're not experienced in interpreting them, you can ask your IT or server support.

Also, check if the problem is caused by

  • an Android problem (manufacturer-specific restrictions, LineageOS privacy guard, Android and firmware bugs),
  • wrong Android settings (global synchronization disabled),
  • server problems (e.g. well-known URLs are not set up correctly), or
  • networking problems, especially firewalls / proxies, wrong port forwardings, ISPs which block or modify requests – try to connect to the DAV URL with your Android browser to verify the connection.

Common methods to fix problems

If you don't find a specific solution for your problem, you can always try these general methods:

  • In case a problem is related to a specific contact/event/task, delete this resource on the server and on your Android device and force synchronization.
  • In case a problem is related to a specific address book/calendar/task list, disable this collection in the DAVx⁵ account (uncheck it in the list), force synchronization, enable it and force synchronization again.
  • Reboot your device and try again.
  • You can try to clear the Contacts Storage and Calendar Storage of your device: Android settings / Apps / System apps / Calendar Storage and Contacts Storage (usually com.android.providers.calendar and com.android.providers.contacts, but can vary by vendor) / Clear data. All locally stored contacts and events will be cleared (including unsaved changes!) and downloaded from the server at the next sync. This often helps when a device update has caused corruption in the Contacts or Calendar database.
  • If this doesn't help, delete the DAVx⁵ account on your device and add it again.
  • If this doesn't help, uninstall DAVx⁵, then install it and add the account again.

Android debugging

With adb, you can do powerful things with your Android device (you have to turn on USB debugging; no root required). It comes with the Android SDK, but also as a standalone package for most operating systems.

You don't need to install adb to see the DAVx⁵ debug logs. You can use DAVx⁵ verbose logging (DAVx⁵ / Settings / Verbose logging) instead.

However, DAVx⁵ isn't allowed to read system logs (debug output of system processes), so it can't put system logs into its external log files. To view system logs, use adb logcat. To get full DAVx⁵ logs in logcat:

  1. force-quite DAVx⁵
  2. do adb shell setprop log.tag.davdroid VERBOSE to set the appropriate log levels
  3. do adb logcat again
  4. start DAVx⁵ again, force-sync

You can also see how contacts/events are really stored on your system:

  • list Android calendars with
    adb shell content query --uri content://com.android.calendar/calendars
  • list Android events with
    adb shell content query --uri content://com.android.calendar/events
  • list Android raw contacts with
    adb shell content query --uri content://com.android.contacts/raw_contacts
  • view details of an Android raw contact with
    adb shell content query --uri content://com.android.contacts/raw_contacts/{RawContactID}/data

Source code

To verify a potential bug, you may find it helpful to take a look into the DAVx⁵ source code.