[solved] Can't sync contacts (calendar ok)



  • I deleted the 2 colons present in the values, but it didn't solve the problem.
    Maybe other special caracters can prevent from sync to work ? ("?", "/", "!"...)



  • I have the same problem with DAVdroid 0.4.3. DAVdroid finds the addressbook after entering the carddav-link from ownCloud, but does not sync anything. The addressbook is empty.

    Server: ownCloud 5.0.11
    Phone: Sony Xperia S with Android 4.1.2

    Interesting fact:
    Syncing with the CardDAV app from Marten Gajda works fine.
    If I let the DAVdroid carddav-account active and add a CardDAV carddav-account, I get duplicated addresses and birthdays in my contacts. But my contacts do not get duplicated.
    If I remove the DAVdroid carddav-account, the duplicated addresses and birthdays disappear.
    So it seems, that DAVdroid syncs something, but the synced data are not stored properly on the phone. DAVdroid only stores data after the contacts were created by CardDAV but it cannot create/sync the contacts itself.

    Maybe this helps...


  • developer

    Possibly because of missing VCard 4 support? See issue #67



  • O.4.4 is OK for me, first contacts sync done 🙂
    Are all the fields well sync'ed ? I haven't verified yet...
    Thanks !


  • developer

    DAVdroid 0.5 comes with VCard 3 support as CardDAV specs require. Please test and if there's something missing, feel free to comment here again.



  • I still have the same problem with DAVdroid 0.5.1.

    DAVdroid does not sync any contact, but after adding a CardDAV sync account of Marten Gajdas app, I get duplicated birthdays and addresses.
    After removing the DAVdroid account, these duplicates disappear.
    After removing the CardDAV account (Marten Gajda), the contacts disappear.

    aLogcat shows no "dav"-related log entries.
    ownCloud shows no "dav"-related log entries.

    Any other ideas? 😞


  • developer

    DAVdroid definitely produces log output. Do you have a rooted phone / get the logs via adb? Without logs, I can't do anything.



  • Hey there, same issue here.

    First, the setup:

    • OC 5.0.14a (tried with 6.0.0 and 6.0.0a, but since those have broken addressbooks anyways, I downgraded)
    • DavDroid 0.5.4-alpha from FDroid
    • Android 4.1.2 on HTC Sensation, no CyanogenMod

    CalDav sync works, CardDav doesn't.

    I use the default OC address book with a single test contact. In contact manager, there's no Phonebook "DavDroid" or anything. The test contact doesn't show up, either. in OC it's there, in Thunderbird it gets synced, too.

    Relevant Logoutput of "adb logcat | grep davdroid" (url and username censored for now):

    D/ManageAccounts( 1749): ==Open ManageAccountsSettings== : bitfire.at.davdroid
    D/ManageAccountsSettings( 1749): ==Open AccountSyncSetttings== : bitfire.at.davdroid
    D/PowerManagerService( 425): acquireWakeLock(4191b038): PARTIAL_WAKE_LOCK , tag=sync_com.android.contacts_Account {name=lyn************v, type=bitfire.at.davdroid}, flags=0x1, pid=425, uid=1000, mUserState=0x3
    I/davdroid.DavSyncAdapter( 6065): Performing sync for authority com.android.contacts
    I/davdroid.WebDavResource( 6065): Using preemptive authentication (not compatible with Digest auth)
    I/davdroid.SyncManager( 6065): Remotely removing 0 deleted resource(s) (if not changed)
    I/davdroid.SyncManager( 6065): Uploading 0 new resource(s) (if not existing)
    I/davdroid.SyncManager( 6065): Uploading 0 modified resource(s) (if not changed)
    I/davdroid.SyncManager( 6065): Synchronization forced
    I/davdroid.SyncManager( 6065): Fetching remote resource list
    D/davdroid.HttpPropfind( 6065): Prepared PROPFIND request: <propfind xmlns="DAV:">
    D/davdroid.HttpPropfind( 6065): <prop>
    D/davdroid.HttpPropfind( 6065): <CS:getctag xmlns:CS="http://calendarserver.org/ns/"/>
    D/davdroid.HttpPropfind( 6065): <getetag/>
    D/davdroid.HttpPropfind( 6065): </prop>
    D/davdroid.HttpPropfind( 6065): </propfind>
    I/davdroid.SNISocketFactory( 6065): No SNI support below Android 4.2!
    I/davdroid.SNISocketFactory( 6065): Established TLSv1 connection with URL using TLS_RSA_WITH_AES_128_CBC_SHA
    D/davdroid.WebDavResource( 6065): Received HTTP/1.1 207 Multi-Status
    D/davdroid.WebDavResource( 6065): Processing multi-status element: https://URL/remote.php/carddav/addressbooks/USERNAME/contacts/
    D/davdroid.WebDavResource( 6065): Processing multi-status element: https://URL/remote.php/carddav/addressbooks/USERNAME/contacts/87dfb34822.vcf
    D/davdroid.WebDavResource( 6065): <?xml version="1.0" encoding="utf-8"?>
    D/davdroid.WebDavResource( 6065): <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:card="urn:ietf:params:xml:ns:carddav"><d:response><d:href>/remote.php/carddav/addressbooks/USERNAME/contacts/</d:href><d:propstat><d:prop><x3:getctag xmlns:x3="http://calendarserver.org/ns/">1389106602</x3:getctag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getetag/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/carddav/addressbooks/USERNAME/contacts/87dfb34822.vcf</d:href><d:propstat><d:prop><d:getetag>"a005bbb51cc3b1055ace141112dc113d"</d:getetag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><x3:getctag xmlns:x3="http://calendarserver.org/ns/"/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>
    I/davdroid.SyncManager( 6065): Fetching 0 new remote resource(s)
    I/davdroid.SyncManager( 6065): Fetching 1 updated remote resource(s)
    D/davdroid.WebDavResource( 6065): Received HTTP/1.1 200 OK
    D/davdroid.WebDavResource( 6065): BEGIN:VCARD
    D/davdroid.WebDavResource( 6065): VERSION:3.0
    D/davdroid.WebDavResource( 6065): UID:87dfb34822
    D/davdroid.WebDavResource( 6065): PRODID:-//ownCloud//NONSGML Contacts 0.2.5//EN
    D/davdroid.WebDavResource( 6065): REV:2014-01-07T14:56:41+00:00
    D/davdroid.WebDavResource( 6065): FN:test
    D/davdroid.WebDavResource( 6065): N:;test;;;
    D/davdroid.WebDavResource( 6065): NICKNAME:test
    D/davdroid.WebDavResource( 6065): CATEGORIES:Family
    D/davdroid.WebDavResource( 6065): END:VCARD
    I/davdroid.SyncManager( 6065): Updating 87dfb34822.vcf
    D/davdroid.LocalCollection( 6065): Committing 4 operations
    I/davdroid.SyncManager( 6065): Removing non-dirty resources that are not present remotely anymore
    D/davdroid.LocalCollection( 6065): Committing 1 operations
    I/davdroid.SyncManager( 6065): Sync complete, fetching new CTag
    D/PowerManagerService( 425): releaseWakeLock(4191b038): PARTIAL_WAKE_LOCK , tag=sync_com.android.contacts_Account {name=lyn************v, type=bitfire.at.davdroid}, flags=0x1
    D/AccountTypeManager( 6862): Registering external account type=bitfire.at.davdroid, packageName=at.bitfire.davdroid
    E/ExternalAccountType( 6862): Problem reading XML for external package at.bitfire.davdroid
    D/AccountTypeManager( 6862): Registering external account type=bitfire.at.davdroid, packageName=at.bitfire.davdroid
    E/ExternalAccountType( 6862): Problem reading XML for external package at.bitfire.davdroid
    D/AccountTypeManager( 6862): Registering external account type=bitfire.at.davdroid, packageName=at.bitfire.davdroid
    E/ExternalAccountType( 6862): Problem reading XML for external package at.bitfire.davdroid
    D/AccountTypeManager( 6862): Registering external account type=bitfire.at.davdroid, packageName=at.bitfire.davdroid
    E/ExternalAccountType( 6862): Problem reading XML for external package at.bitfire.davdroid
    D/AccountTypeManager( 6862): Registering external account type=bitfire.at.davdroid, packageName=at.bitfire.davdroid
    E/ExternalAccountType( 6862): Problem reading XML for external package at.bitfire.davdroid

    Any more information you need/things I can try to help debug this?

    Clarification: I found that the contact actually DOES show up, but not anywhere in the phonebooks. i.e. if I search my "People" or "Contacts" for the user "test", I get nothing, but if I go to the phone app and just type his number, it's found as a contact. I don't know where it gets saved to, but I can't edit said contact, and it's basically just "there".


  • developer

    This is a known HTC bug. Marten Gajda has written an info page about it: http://dmfs.org/wiki/index.php?title=HTC_Sense_issue (it's the "second bug" mentioned on that page).

    If CyanogenMod is an option for you, I recommend using it (and thus discarding any bugged HTC Android modifications).



  • Oh thank god. I'll see if I can just replace the HTC stuff, then. I'm on a custom rom anyways. Thanks a lot.