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(WebDavResource.java:473)
    E/AndroidRuntime( 4039):        at at.bitfire.davdroid.webdav.WebDavResource.multiGet(WebDavResource.java:336)
    E/AndroidRuntime( 4039):        at at.bitfire.davdroid.resource.RemoteCollection.multiGet(RemoteCollection.java:81)
    E/AndroidRuntime( 4039):        at at.bitfire.davdroid.syncadapter.SyncManager.synchronize(SyncManager.java:141)
    E/AndroidRuntime( 4039):        at at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(DavSyncAdapter.java:70)
    E/AndroidRuntime( 4039):        at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)
    

    The vcard on which is crashes looks like this:

    BEGIN:VCARD
    VERSION:3.0
    UID:https://reox@my_dav_server.com/reox/addresses/20FBDA0A-609543DB-1AF3DF45.v
     cf
    EMAIL;TYPE=INTERNET,HOME:info@moskau.diplo.de
    FN:Deutsche Botschaft Moskau
    N:Moskau;Deutsche;Botschaft;;
    TEL;TYPE=CELL:0074959379500
    X-CALYPSO-NAME:20FBDA0A-609543DB-1AF3DF45.vcf
    END:VCARD
    

    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.



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



  • 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: http://pastebin.com/VuLt9xsL
    i changed the real server url to dav.my_caldav_server.com.


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