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(AsyncTask.java:300)
    E/AndroidRuntime( 3483): 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
    E/AndroidRuntime( 3483): 	at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
    E/AndroidRuntime( 3483): 	at java.util.concurrent.FutureTask.run(FutureTask.java:242)
    E/AndroidRuntime( 3483): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    E/AndroidRuntime( 3483): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    E/AndroidRuntime( 3483): 	at java.lang.Thread.run(Thread.java:818)
    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(DavResourceFinder.java:205)
    E/AndroidRuntime( 3483): 	at at.bitfire.davdroid.resource.DavResourceFinder.getCurrentUserPrincipal(DavResourceFinder.java:233)
    E/AndroidRuntime( 3483): 	at at.bitfire.davdroid.resource.DavResourceFinder.findResources(DavResourceFinder.java:101)
    E/AndroidRuntime( 3483): 	at at.bitfire.davdroid.syncadapter.QueryServerDialogFragment$ServerInfoLoader.loadInBackground(QueryServerDialogFragment.java:
    

    Full logcat log attached

    https://gist.githubusercontent.com/vsviridov/740dc554fa96cb46663d/raw/f1cd92f7db1c97d020d40de8fbf8fdc7e67f9834/logcat.txt


  • 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.