NullPointerException while syncing contacts

  • Hi,
    the app crashes while syncing contacts:

    E/AndroidRuntime( 4039): FATAL EXCEPTION: SyncAdapterThread-1
    E/AndroidRuntime( 4039): Process: at.bitfire.davdroid:sync, PID: 4039
    E/AndroidRuntime( 4039): java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes()' on a null object reference
    E/AndroidRuntime( 4039):        at at.bitfire.davdroid.webdav.WebDavResource.processMultiStatus(
    E/AndroidRuntime( 4039):        at at.bitfire.davdroid.webdav.WebDavResource.multiGet(
    E/AndroidRuntime( 4039):        at at.bitfire.davdroid.resource.RemoteCollection.multiGet(
    E/AndroidRuntime( 4039):        at at.bitfire.davdroid.syncadapter.SyncManager.synchronize(
    E/AndroidRuntime( 4039):        at at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(
    E/AndroidRuntime( 4039):        at android.content.AbstractThreadedSyncAdapter$

    The vcard on which is crashes looks like this:

    FN:Deutsche Botschaft Moskau

    but if i delete it the error will persist, so it does not depend on the vcf file.
    to clearify this: we tried with two clients on two different calypso servers with different contacts - the problem is always the same. it seems like that calypso serves the vcf files in a diferent way.

    server is calypso.

  • admin

    Do you know how to get logcat output from your device (which one is it with which Android version)?

  • android 4.4.1 / nexus s / cyanogenmod11-nb
    yes, this is the error message from logcat. what else do you need?

  • admin

    We need the detailed logcat output (especially everything with “tag:davdroid”, i.e. what has been sent to/received from the server and not just the exception report).

  • This is a “sync now” log:
    i changed the real server url to

  • developer

    As you can see in the server’s response to multiget, there’s no address-data content (= no VCards).

    I will add a null pointer check so that DAVdroid won’t crash, but it still won’t sync the contacts because the server doesn’t send any. I think this is a server issue. Do you know where the Calypso bug tracker is?

  • calypso has no dedicated bugtracker; it has a mailing list, and the debian bug tracker for calypso should be a good place to report bugs – but given that i’m the calypso contributor who has implemented the first basic steps towards davdroid compatibility, you can consider it reported.

  • developer

    Ok, thanks, I will close this. If you think there’s something wrong or not compliant on the DAVdroid side, please comment here again.

Similar topics

  • 7
  • 10
  • 2