Crashes when adding an account on Android 5.0

  • Worked without issue on Lollipop Developer Preview. Crashes on retail version.

    FATAL EXCEPTION: AsyncTask #1
    E/AndroidRuntime( 3483): Process: at.bitfire.davdroid:sync, PID: 3483
    E/AndroidRuntime( 3483): java.lang.RuntimeException: An error occured while executing doInBackground()
    E/AndroidRuntime( 3483): 	at android.os.AsyncTask$3.done(
    E/AndroidRuntime( 3483): 	at java.util.concurrent.FutureTask.finishCompletion(
    E/AndroidRuntime( 3483): 	at java.util.concurrent.FutureTask.setException(
    E/AndroidRuntime( 3483): 	at
    E/AndroidRuntime( 3483): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(
    E/AndroidRuntime( 3483): 	at java.util.concurrent.ThreadPoolExecutor$
    E/AndroidRuntime( 3483): 	at
    E/AndroidRuntime( 3483): Caused by: java.lang.ClassCastException: java.lang.Object[] cannot be cast to java.lang.String[]
    E/AndroidRuntime( 3483): 	at at.bitfire.davdroid.resource.DavResourceFinder.getInitialContextURL(
    E/AndroidRuntime( 3483): 	at at.bitfire.davdroid.resource.DavResourceFinder.getCurrentUserPrincipal(
    E/AndroidRuntime( 3483): 	at at.bitfire.davdroid.resource.DavResourceFinder.findResources(
    E/AndroidRuntime( 3483): 	at at.bitfire.davdroid.syncadapter.QueryServerDialogFragment$ServerInfoLoader.loadInBackground(

    Full logcat log attached

  • developer

    Thanks for the report. It's a duplicate of #183 which describes a problem with handling TXT records.

  • Strange, that it was working fine with developer preview. Although I used a different method for importing the root certificate this time. (Last time I installed the certificate and then moved it into the system storage with Cert mover from FDroid. This time I got the CACert installer from play store).

  • developer

    Strange, that it was working fine with developer preview.

    Did you try exactly the same DAVdroid version and were exactly the same SRV/TXT records set?

  • I have not touched SRV/TXT records until last night. And I used whatever latest version of DavDroid from FDroid. It's usually one of the first things I install and keep updated all the time.

    Just tried again after removing TXT record and letting it propagate. It was able to pick up calendars and address books normally.