Unsynced contacts



  • Hi,
    I’m syncing a calendar from a CardDAV server which seems to work fine in general.
    But for any reason not all of my contacts in the server appear on my Android 8 phone’s (Samsung) contacts app.
    It seems that the ones which are missing already exist somewhere in my phone’s data at least as a mobile phone number connected via WhatsApp.
    I have two types of contacts which are not added from the CardDAV server:

    1. some which already have an entry in my contact list because I added them with a name after I had them as WhatsApp contact
    2. some which do not at all show up in my contacts app but still they are part of a WhatsApp group

    Is that behaviour expected at all? Or is there any other issue with importing the contacts but when I compare the contacts missing to the ones actually imported it really looks related to this.

    Thanks,
    Wolfgang



  • Hi Wolfgang,
    which server do you use? Is it a Synology? Did you export old contacts from the phone into the server?

    Generally speaking DAVx5 does write its synced content (=the contacts) to the Android contacts storage (grouped in a seperate DAVx5 account). From that time all other apps accessing the contacts storage (Dialer app, Whatsapp, Threema, Contacts app, etc) can read the contacts and use it.
    Most likely some of the contacts which dont show up or are not synced are not in a valid format maybe. We can’t “repair” wrong contacts, but we skip them if they cant be synchronized to the device. You can post a vcf file here which is on the CardDAV server but can’t be synchronized.

    People in a Whatsapp group don’t necessarily need to be a contact on your phone, too. They can just be numbers which were added by thge group admin.
    Best regards,
    Bernhard



  • Hi,
    the server is Open-Xchange (as also used by mailbox.org).
    The contacts were created on the server and are synced to (currently) two devices. The other device works fine but admittedly runs “carddav sync” instead of DAVx5 and also did not have any traces from any contact in the DAV addressbook before. (Also no WhatsApp installed, and using another Google profile).
    The addressbook has currently 17 objects/contacts but only 11 are synced at the moment.
    The contacts itself have very few attributes. Typically just 1-2 email addresses and 1-2 phone numbers. I could also share a VCF export but not publically to not expose personal data.

    Thanks,
    Wolfgang



  • Hi, please send the vcf to support-de@davx5.com. We will take a look at it! You can also try to enable extended logging in the dAVx5 settings and see whats happening when the sync is running.



  • @devvv4ever said in Unsynced contacts:

    You can also try to enable extended logging in the dAVx5 settings

    I just tried that by enabling the logging, triggering the sync. But when I tried to send the log via mail the file could not be attached. Also tried to upload the file to my Synology Drive via the app which also failed. Any hint how I can get the log file from the device?
    Exact DAVx5 version is 2.5.4-ose (298)
    I will send the full addressbook VCF later but need to mark the missing ones for comparison.



  • Maybe try the app “ShareviaHttp” if the rest of the applications don’t support the handling/receiving of attachements, and open the file on a desktop pc in the browser, then send it to the email address above.
    More information about debugging can be found here: https://www.davx5.com/faq/how-to-debug



  • Hmm interesting. Share via http serves a file called davx5-log.txt with the following content:

    content://at.bitfire.davdroid.debug/debug/davx5-log.txt
    

    Wondering if that is the intention?


  • developer

    @Wolfgang-Rosenauer No, it should serve a file with the debug info. Interestingly, many people say that it doesn’t work (file empty), but it should work and I have never been able to reproduce any of the problems. What if you attach the file to an email?



  • @rfc2822 I could not get Android to attach the file to a mail, upload it to any drive application, or share it via different messengers. So really I have no idea what the issue is here.


  • developer

    You can also use adb directly (but its somehow cumbersome).



  • Using adb I got the following after removing the account and doing a completely new sync:

    08-27 00:24:18.605 27026 31165 I davx5   : [syncadapter.SyncManager] Listing changes since null
    08-27 00:24:18.691 27026 31167 I davx5   : [syncadapter.SyncManager] 0f5fe756-b97c-470e-bfb5-a9bca7f18912.vcf has been added remotely
    08-27 00:24:18.722 27026 31167 I davx5   : [syncadapter.SyncManager] ef6b0cc2-5add-47bf-b15f-538beb6ede8b.vcf has been added remotely
    08-27 00:24:18.723 27026 31168 I davx5   : [syncadapter.SyncManager] 59c61c14-24ce-46a8-9dae-5be3b745f992.vcf has been added remotely
    08-27 00:24:18.730 27026 31170 I davx5   : [syncadapter.SyncManager] bbc13c91-eae9-49e6-b71e-a33c1c5b1ca0.vcf has been added remotely
    08-27 00:24:18.739 27026 31169 I davx5   : [syncadapter.SyncManager] 5d4fe96e-0aa2-4e85-bf60-e8a9fbe90c09.vcf has been added remotely
    08-27 00:24:18.748 27026 31165 I davx5   : [syncadapter.SyncManager] dca5a1ab-0e9b-4a2f-b808-892959b2304c.vcf has been added remotely
    08-27 00:24:18.750 27026 31167 I davx5   : [syncadapter.SyncManager] 9c28e977-11de-41e4-af20-5a7dc7a46808.vcf has been added remotely
    08-27 00:24:18.753 27026 31170 I davx5   : [syncadapter.SyncManager] c6fa183c-bcb1-4a16-afc1-82e9a9f9a8e2.vcf has been added remotely
    08-27 00:24:18.757 27026 31168 I davx5   : [syncadapter.SyncManager] 28392ce0-75f5-4e98-b636-b6f24681c1f8.vcf has been added remotely
    08-27 00:24:18.765 27026 31169 I davx5   : [syncadapter.SyncManager] 45686089-74ac-4416-a758-7da9b07831c1.vcf has been added remotely
    08-27 00:24:18.769 27026 31171 I davx5   : [syncadapter.ContactsSyncManager] Downloading 10 vCards: 
    08-27 00:24:18.776 27026 31165 I davx5   : [syncadapter.SyncManager] Saving sync state
    08-27 00:24:18.776 27026 31165 I davx5   :      PARAMETER #0 = {"type":"SYNC_TOKEN","value":"1566858117440","initialSync":true}
    08-27 00:24:18.778 27026 31170 I davx5   : [syncadapter.SyncManager] 09fc5ab2-5ff6-41e4-a1a8-425659d005d8.vcf has been added remotely
    08-27 00:24:18.779 27026 31167 I davx5   : [syncadapter.SyncManager] cb950a28-a437-44a2-9b22-d7625208cd85.vcf has been added remotely
    08-27 00:24:18.826 27026 31167 I davx5   : [syncadapter.SyncManager] d08f732e-b273-4b82-b97b-f5ca4731d335.vcf has been added remotely
    08-27 00:24:18.828 27026 31168 I davx5   : [syncadapter.SyncManager] a0e26e89-b279-461d-82af-a710adbf108e.vcf has been added remotely
    08-27 00:24:18.837 27026 31170 I davx5   : [syncadapter.SyncManager] d410b87e-5c10-4d4d-b9ae-bc7ea0792fd9.vcf has been added remotely
    08-27 00:24:18.840 27026 31169 I davx5   : [syncadapter.SyncManager] e2cc274d-356e-46e6-999a-3a9fa9eb3654.vcf has been added remotely
    08-27 00:24:18.865 27026 31168 I davx5   : [syncadapter.SyncManager] df3fb82e-5ede-4bd4-a55d-71a4c36898bc.vcf has been added remotely
    08-27 00:24:18.884 27026 31167 I davx5   : [syncadapter.SyncManager] 0c7ce69d-a368-4eb3-a9ae-f559aad39ecd.vcf has been added remotely
    08-27 00:24:18.893 27026 31165 E davx5   : [syncadapter.ContactsSyncAdapterService] Couldn't sync contacts
    08-27 00:24:18.893 27026 31165 E davx5   : EXCEPTION java.lang.InterruptedException
    08-27 00:24:18.893 27026 31165 E davx5   :      at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2034)
    08-27 00:24:18.893 27026 31165 E davx5   :      at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2111)
    08-27 00:24:18.893 27026 31165 E davx5   :      at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1481)
    08-27 00:24:18.893 27026 31165 E davx5   :      at at.bitfire.davdroid.syncadapter.SyncManager.syncRemote(SyncManager.kt:517)
    08-27 00:24:18.893 27026 31165 E davx5   :      at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1.invoke(SyncManager.kt:171)
    08-27 00:24:18.893 27026 31165 E davx5   :      at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1.invoke(SyncManager.kt:54)
    08-27 00:24:18.893 27026 31165 E davx5   :      at at.bitfire.davdroid.syncadapter.SyncManager.unwrapExceptions(SyncManager.kt:836)
    08-27 00:24:18.893 27026 31165 E davx5   :      at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.kt:113)
    08-27 00:24:18.893 27026 31165 E davx5   :      at at.bitfire.davdroid.syncadapter.ContactsSyncAdapterService$ContactsSyncAdapter.sync(ContactsSyncAdapterService.kt:64)
    08-27 00:24:18.893 27026 31165 E davx5   :      at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:73)
    08-27 00:24:18.893 27026 31165 E davx5   :      at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272)
    08-27 00:24:18.894 27026 31165 I davx5   : [syncadapter.ContactsSyncAdapterService] Contacts sync complete
    

    So contacts are loaded in chunks of 10 I guess. The first ten could be synced but apparently the second chunk failed for some reason and therefore all 8 from the second chunk are not created? At least I got exactly 10 out of 18 imported into the phone.
    So any idea how to find the reason for the exception from that? Otherwise I will send the VCF containing all 18 contacts tomorrow via PM.


  • developer

    @Wolfgang-Rosenauer Thanks for the logs. InterruptedException normally means that a thread was interrupted by software, most often by cancelling the synchronization. So it seems like the synchronization is cancelled by something, maybe even Android itself. How long does the sync take? Is there something that takes really long until the vcf download begins?



  • hmm, from the log the sync took something between 10-15 seconds from manually starting until the contacts were loaded. I tested it again and this time all contacts were synchronized. Not sure if this was pure luck now or the difference was that I didn’t leave DAVx5 quickly after selecting the address book to sync.
    Or is leaving the app terminating the initial sync? That would be unexpected to me.


  • developer

    @Wolfgang-Rosenauer said in Unsynced contacts:

    Or is leaving the app terminating the initial sync? That would be unexpected to me.

    Sounds exactly like all those battery and data saving options. Are you sure that “battery saving” and “data saving” are disabled for DAVx⁵? Does this also happen in WiFi?

    I’d also like to know why sharing the debug info doesn’t work for you. Which exact device do you have?



  • @rfc2822 said in Unsynced contacts:

    Sounds exactly like all those battery and data saving options. Are you sure that “battery saving” and “data saving” are disabled for DAVx⁵? Does this also happen in WiFi?

    All my testing has been done on Wifi. I just checked the Android settings for power saving but this is somehow different between every Android and vendor version. So far I think it was neither blacklisted nor whitelisted. Therefore the Android/Samsung default for the device should apply. I have it now whitelisted in addition.

    I’d also like to know why sharing the debug info doesn’t work for you. Which exact device do you have?

    That one is a Samsung A5 (2017) SM-A520F with Android 8.0.0, Samsung Experience 9.0.


  • developer

    @Wolfgang-Rosenauer said in Unsynced contacts:

    I have it now whitelisted in addition.

    Does it work with this whitelist? For testing, it would also be interesting whether it works as expected when the device is plugged in to power.



  • I need to test a bit later today. For the power connection. When I got the log yesterday this happened via adb and USB. Does this count as plugged in? I would expect so.


Log in to reply
 

Similar topics