Suddenly CardDAV Entries Create Several Duplicates

REPRODUCIBILITY: Already when typing this text
OS VERSION: Sailfish OS 4.5
HARDWARE: Sony Xperia 10 III
UI LANGUAGE: English
REGRESSION:

DESCRIPTION:

CardDAV entries that have been added on the phone during the last months suddenly get duplicates on a daily (?) base. However, those duplicates do only exist on the server, but not on the phone.

PRECONDITIONS:

CardDAV entries have been added via Sailfish GUI in address book app.

STEPS TO REPRODUCE:

Nothing to do - “works” automatically and creates duplicates.

EXPECTED RESULT:

No (!) duplicates should be created.

ACTUAL RESULT:

Address book is getting spammed with duplicate entries.

MODIFICATIONS:

No patches, no custom entries, etc.

ADDITIONAL INFORMATION:

Just imagine a

3 Likes

Please try collecting logs using

1 Like

It happened to me as well, recently. Eventually I had hundreds of duplicated entries in Nextcloud for each new contact I created on the phone.
Since the sync daemon seemed to be busy by duplicating those entries it also stopped syncing my calendar.

I couldn’t find anything useful in the logs and didn’t find any hints to fix this.
So I deleted the account in settings. Deleted the duplicated contacts in my desktop app.
Then I recreated my Nextcloud account and syncing works again.

1 Like

Hi
I deleted duplicates on a regular basis, until I would take time to investigate the problem.
I found your solution and tried, deleting duplicates and nextcloud account before recreating it: it seems to work very well !

I had some contacts data not syncronized at all, names or phones number not updated etc. I just checked a edited name, it synced !
I’m happy, thank you very much

Had the same already in the previous relase. Xperia 10 II. Didn`t suspect Sailfish to be the cause.

I had this issue as well (with Xperia I), quite a while ago. I thought as well, that this is more a Nextcloud issue than a Sailfish OS issue. However, I have no prove for that.
Since I am now using an Xperia III, I haven’t set up CardDAV, yet. Once I come over that, I will try to get some logs…

Hi! I just found this bugreport. There is a thread about this in General and I posted my findings there:

I did some digging in the log. Maybe it helps?

Hi there,

I hope this bug gets some attention because I already saw it last year. If there is a way to support solving this please let me know.
Today I checked my NextCloud log and there is nothing in there.

@dcaliste Any suggestions what further to try?

What exactly is needed from the logs?
Is there a documented way to remove sensitive information?

Did anyone observe this on another CardDav server than Nextcloud?
And please report the Nextcloud version you are using.

It is highly likely that this has something to do with how the server presents the data to the client.
I could not reproduce this yet with my Nextcloud.

The logs from x2s look like the server might receive the entry, add it but still return an error to the client, thus the client retries:

(Don’t know if i read this wrong, but I guessed status is what the server returned)

<d:status>HTTP/1.1 404 Not Found</d:status>"
<d:status>HTTP/1.1 418 I’m a teapot</d:status>"
CardDAV sync for account: 33 finished with error: 412

… and why would anything in the real world return 418… maybe a proxy in front of nextcloud…?
maybe related:

I am always on the latest version of NextCloud stable. Sofar I have only tested NC. For me the issue exist since ~18 month.

Will try to redo the account, this helped last time upto the next SFOS update.

My log was made with Nextcloud 25, but recently I’ve updated to 27 and the bug is still present. I have no proxy between me and nextcloud.

I also have duplicate adress entries on the server (Fastmail CardDAV). Duplicates only happen when the address has been entered on the phone, the longer it goes the more duplicates seem to be created. This bug is extremely irritating, basically one cannot any longer create contacts on the phone :frowning: .

This happens on a XA2 phone since about a year, the OS has always been updated to the latest version available.

PS: how would/could I help with trying to find out where the issue is? Logfiles, but which/where? Thanks.

Creating a log file is rather easy. Just follow the “Sync Logs” section here: CalDAV and CardDAV Community Contributions | Sailfish OS Documentation

It’s basically stopping the sync daemon and manually starting it with a higher log level. The only thing I did differently is to use tee to pipe it into a file and for being able to see what’s happening. Not sure if I had to redirect stderr to stdout.

The log will contain lots of personal data though, so you either have to anonymize everything up or post a redacted version as I did.

1 Like

Finally updated to 4.6 and I did some tests again.

The duplicating contacts seems to be fixed. But I will observe if that’s totally true.

Otoh there are lots of synchronization issues. But those will have to wait until August, when we get a release for the 10 V. I want to make sure that this is something that happens on a new system as well and not a problem with my currenty setup.

I had this problem some time ago, too. The reason for this has been a ‘corrupted’ contact that contained some kind of very special character. The sync broke every time when the phone tried to sync this contact. Every contact that has been synced beforehand has been multiplied. Every contact after this corrupted one did not sync at all. It took me some time to find the cause for this.
My theory: While the phone was syncing some time ago, network connection broke causing this truncated and corrupted contact on the phone. This then has been causing the problems on every succeeding sync. My solution was to find this corrupted contact (which is none of the duplicated ones), delete it, and re-sync. After that no more new duplications occurred and I deleted all the old dupes.

I had this twice. Maybe it helps someone pinpointing the problem - if it still exists.

2 Likes