macOS Catalina CardDAV Sync just oneway

Hello,
i am using NC 18.0.4 on a Synology NAS. As clients I use macOS Catalina Adressbook and iOS 12 and 13.

First, I have to use the Links provides in the NC Calendar App, because otherwise I don’t get any connection on both systems, iOS and macOS. Is that correct?

The problem:
Sync between the iOS devices works fine. Changes on the iDevices are transferred to the server and shown in the web-interface immediately.
On macOS: After setting up the CardDAV Account (both manually or via the profile) the Adressbook App shows the Contacts. When I change, add or delete a contact, those changes are not transferred to the server.

I have already done a clean install of NC after deleting all files and databases. The error remains the same.

I hope that I have explained the problem clearly enough. If you have any questions please let me know. :slight_smile:

I am very grateful for any help.
Thank you in advance.

Julian

Hello, this sounds quite exactly like the problem I have here as well. Syncing between NC 18.0.4 and Mac OS Catalina 15.4 Adressbook works only once after creating the account. After that all changes done on the Mac are not syncing to the server and changes inside NC Adressbook are not refreshed on the Mac Adressbook any more. Sync on iOS 13 is working here as well. Has anybody an idea how to get this sync working?

Hello Vincent, I have learnt with Apple CardDAV and CalDAV, that you have to define the well-known service uri very carefully. After I checked all this in the htaccess, everything started working. See you.

Hello Julian, thanks for your answer. Could you give me a hint what you changed in the htaccess that makes it work for you now? I thought about that also before, but since the calendars on all my devices sync without any problems and the Contacts from the cloud appeared after the setup, I assumed that the problem is not caused by this. Greetings, Vincent

Dear Vincent, how do you set up the CalDAV Account?
Do you use “Manual” and type in just the URL of your server?
Or do you chose “Advanced” and fill server URL and path?
See you

Hello Julian, for both, the CalDAV and the CardDAV account I used the manual option giving only the URL first (without server path). For the CalDAV it was working fine without any changes after that. Since it was not working for the CardDAV account, I deleted this account and tried advanced as well and used the path (/remote.php/dav/principals/users/USERNAME/). Unfortunaltely this did not change anything.

I also saw in the account settings within Mac Calendar and contacts app, that in the calendar app the path (/remote.php/dav/principals/users/USERNAME/) is set after setting up the account (automatically), while in the contacts app the path is always empty (no matter which type of setup I do initially or which information I give -> manual with only the url OR the complete path in the url field, advanced with path in the serverpath field). Even adding the path afterwards (to make it same like in the calendar app)

After you wrote me today, I made a couple of tests again. And I found out (like before) that it seems to work exactly for one time (first time) syncing (in both directions, depending on if I manage to add a contact on my mac after setup BEFORE the first sync). So in general I think that the .htaccess is working fine somehow.

It is really weird, seems to be something like a cached behaviour for the mac contact app only, since my phone and the cloud are able to sync between each other.

Oh, and I have an owncloud installation as well, where the sync works fine by the way (so it seems not to be a general problem on the/my mac contacts app maybe).

But you said you changed something in the htaccess at the time it was not working for you, right? Do you remember what it was?

Greetings, Vincent

Hello Vincent,
I also made some Tests. I think I found the bug. Before you set up the CardDAV Account in Settings -> Accounts, it is recommended to delete the settings in your user directory ~/Library/Application Support/Address Book/.
After this everything worked fine.
I have tested this with Nextcloud and Baikal.
Best regards.
Julian

Hi Vincent! Did this workarount make it work?

Hi Julian, sorry, I was busy yesterday. I was not brave enough to do that yet, bcs I have also my iCloud-Account and another owncloud-Account inside the adressbook. I think when I delete all the files from that directory the data is gone, right? Yesterday I saw that it has synced again, without I have done anything in the meantime btw.

Dear Vincent,
This is strange. I think the Problem is the number of accounts. I have also noticed, that sometimes the sync takes a lot of time. Maybe you can regard the the behaviour and tell me. In the Future, I want to sync more accounts.
Best regards.
Julian

Hi Julian, I will report it here in a couple of days. Maybe I will also give it a try to delete the Adressbook folder and see what happens after recreating the account(s). For now I can say, that it seems that sync is done, but somehow there seems to be a delay of around 24 hours (only with nextcloud…iCloud and owncloud are refereshed directly…). Greetings, Vincent.