Not all Contacts are imported

I have a big contact list. Big both in number of contacts and in storage because of profile pictures. The list is stored on my Nextcloud and I want to keep it synced. I haven’t been able to import them into e/OS successfully. Methods I’ve tried:

  • CardDAV sync from settings
  • DAVx5 app
  • Export contacts to .vcf and import in contact app
  • Import .vcf info Fossify contact app

In all cases the import of contacts is partial, of I guess 10%. I tried forcing a sync, but that didn’t change anything.

This same contacts list worked fine on my previous Fairphone stock Android installation through DAVx5.

Perhaps it has to do with the initial sync vs differential updates.

Any suggestions how to debug the situation or use a workaround?

if nextcloud-to-davx5 worked before with the dataset, it should continue to work?

You can look at the http status codes of when davx5 or accountmanager (the built-in davx5 fork) checks the addressbook url if it’s any other than a 200-class response (207 etc).

Looking at adb logcat output scoped to davx/AM what it says the moment it updates. If you see error stacktraces, you can take their most relevant line to the bugtrackers

here are the bugtrackers of the involved projects:

1 Like

@tcecyk thanks. I’ll read up on adb logcat.

I enabled developer settings, enabled USB debugging, installed ADB, enabled USB debugging and started logging. That gave some more insights.

Filtering can work like this (although other applications are involved as well):

$ adb logcat .davdroid.sync.SyncManager:D *:S

There seem to be no errors related to the sync.

It does seem that new contact are identified but not being downloaded.

04-27 17:06:16.001 26972  5624 D .davdroid.sync.SyncManager: Found remote resource: <uuid>.ics

There were over 200 of such lines, which could be an indicator of missing contacts, although I’m sure I’m missing more.

I also notice entries that suggest entries that are present locally:

04-27 17:06:17.516 26972  5624 I .davdroid.sync.SyncManager: <uuid>.ics has not been changed on server (ETag still <id>)

As DavDroid syncs both contacts, calendar and tasks, it is a bit hard to distinguish categories.

Given that I can see all contacts through other CalDAV clients I assume this is a client-side error, either in DAVx5 or in the calendar application.

As it stands I don’t have anything concrete to follow-up on yet.

My current workaround is to open the Nextcloud Contacts webapp from the phone to lookup details from contacts not yet imported. Then if I open the contact for editing and save it, the update is sufficient to get the contact included in the next sync. So in this way I can incrementally get all the contacts on the phone.

1 Like

the .ics lines are events in your calendar (or tasks). Lines that have “vcard” are for contacts.
Here’s an example sync of a new .vcf entry - see the lines as to “sync state” or any unknown properties where you could read more closely.

full log
I davx5   : [syncadapter.SyncManager] Sent 0 record(s) to server
I davx5   : [syncadapter.ContactsSyncManager] Processing CardDAV resource 4c404b3a-3c26-4ec7-8859-52f918ce546e.vcf
I davx5   : [syncadapter.SyncManager] Local sync state = null, remote sync state = {"type":"SYNC_TOKEN","value":"http:\/\/sabre.io\/ns\/sync\/2"}
I davx5   : [syncadapter.SyncManager] Sync algorithm: full listing as one result (PROPFIND/REPORT)
I davx5   : [syncadapter.SyncManager] Number of local non-dirty entries: 0
I davx5   : [syncadapter.SyncManager] Processing remote entries
I davx5   : [syncadapter.CalendarSyncManager] Querying events since 2025-04-27T23:45:49.782Z
I davx5   : [syncadapter.ContactsSyncManager] Creating local contact
I davx5   :  PARAMETER #0 = at.bitfire.vcard4android.Contact@3d72d9e[addresses=[],anniversary=<null>,birthDay=<null>,categories=[],contactId=,customDates=[],displayName=Louis Lane,emails=[LabeledProperty(property=ezvcard.property.Email [ group=null | parameters={TYPE=[HOME]} | value=louis@example.com ], label=null)],familyName=<null>,givenName=Louis Lane,..,unknownProperties=BEGIN:VCARD
I davx5   : VERSION:4.0
I davx5   : X-CRYPTO;ALLOWED="PGP/INLINE,PGP/MIME,S/MIME,S/MIMEOpaque";SIGNPREF=Ask;ENC
I davx5   :  RYPTPREF=Ask:
I davx5   : END:VCARD
I davx5   : ,urls=[]]

This topic was automatically closed after 60 days. New replies are no longer allowed.