CKErrorDomain 2 when attempting to create the new iCloud sync

Does Bonjour synch work? Faster and more reliable than cloud-based. And could try another cloud service. Apple’s services are not so reliable and certainly not very debuggable as you see.

Bonjour sync does appear to work (haven’t actually downloaded any databases but they’re visible). I don’t really want to change cloud services unless OneDrive is supported, which as far as I can tell it isn’t.

Sounds like nothing working. :pensive:

All this does work for me. But I know this does not help you very much.

However I recommend you start fresh, reread the DEVONthink Handbook on sync set up. Clean everything and start with getting Bonjour to work as it is the best and easiest to setup. The just try to get say Dropbox working with a free account and a small database. Just to confirm you can get a cloud service to work. Forget about Onedrive till it is part of DEVONthink’s world (unlikely). Then tackle CloudKit (but there are few things that Apple provides to help you)

Currently downloading the databases to my new Macbook Air via Bonjour. Once everything’s there I probably won’t really even need DT on the old Mac mini at home. I don’t really use DT on my phone, but maybe I’ll have to revisit if I ever get a new iPad capable of running the current DTTG.

If you don’t use DEVONthink on on your phone, and I presume your Mac Mini is used as a server, then I’m wondering why you are even bothering with sync … What’s the purpose of sync, remembering that sync is NOT a backup?

Since I am the original poster of this thread, I just want to say that the solution has been working very well for me I.e, sync using iCloud (CloudKit). The missing “trick” was that iCloud Drive had to be activated (while making sure Devonthink is selected under Options), as asku found out. Ever since then I have found it syncs very reliably for my two databases, using DTTG 3 on my iPhone and DT 3 on my Mac.

This may not be of any help to sort out your problem, but it may at least be good to know that it has potential to work very well since it has been very stable for me ever since I switched from Dropbox to iCloud and used DDTG 3.

3 Likes

I have this same problem today on a new MacBook Pro. I’ve tried all the steps mentioned here to no avail. Has this ever been resolved? Are there any diagnostic steps to figure out how to get the sync working?

I also encountered this problem today on a new MBP.

Actually, I’d been using DEVONthink for a few months on this MBP before I realized that CloudKit wasn’t working. DEVONthink team, you may want to make sync errors louder somehow. I’m not sure how I missed it—I haven’t been doing much with DEVONthink except saving items lately, so maybe I was just assuming everything was working as expected.

Anyway, I noticed the lack of sync, and went to investigate. Preferences → Sync → iCloud (CloudKit) showed that databases had not been synced for a few months. I tried a few things to get the databases to force a sync but nothing was happening. So, I loaded the Log window (menubar Window → Log) and saw a CloudKit error. I can’t remember the exact phrasing, but it was something about user authentication. So, I tried to fiddle with the authentication from within DEVONthink but that seemed to do nothing. I then removed the CloudKit sync option from DT’s preferences and tried to re-add it—that was when I saw the error OP describes.

I fixed it with @alanhamilton’s steps, though I was not diligent. I simply:

  • quit DEVONthink
  • went into System Preferences → iCloud → iCloud Drive (options) → and de-selected DEVONthink 3.
  • rebooted the machine
  • Opened DEVONthink for some reason
  • Quit DEVONthink
  • System Preferences → iCloud → iCloud Drive (options) → re-enabled DEVONthink 3
  • Launched DEVONthink
  • Preferences → Sync → Add new sync location → iCloud (CloudKit)

And it worked! No more error. My local and remote databases are all catching up with one another as I write this.

Given all the known unreliabilities of Apple’s iCloud (and CloudKit) reported to be on their servers, is there a way to determine if what you did is a “fix” or a coincidental fix?

2 Likes

I’m not sure what you’re asking. I don’t think the issue discussed here is DT’s fault, if that’s what you thought I was implying. But no, I don’t think the recently-covered iCloud server issue was directly at play here. This wasn’t an intermittent “iCloud’s not working, now it is” issue. Before I tried the above, my MBP’s CloudKit sync hadn’t worked since October of 2021.

I am betting that the problem has something to do with a permissions issue on iCloud’s servers. Maybe disabling, rebooting, and re-enabling DEVONthink in iCloud Drive’s options re-negotiated those permissions with iCloud, or something. There’s at least an n = 2 on this thread where this procedure resolved the issue.

i am not implying anything. just trying to gain some insight about your “fix”.

1 Like

Hello,
in your explanation of CloudKit (DEVONtechnologies | What is CloudKit and should I switch to it?) you write the old sync was file based and CloudKit is database based. So why does it still need iCloud Drive enabled to avoid CKErrorDomain 2? My employer does not allow iCloud Drive to be enabled.

Kind regards

If I understand your question (perhaps to have better started a new topic) …

Apple’s iCloud Drive is the computer service they provide which provides CloudKit data base method to developers as described in the link you provided.

If you employer does not allow your computer to access Apple’s server across their network perhaps they are ok with say Dropbox. If not, when I’ve been in that situation I used my personal iPhone as a “Personal Hotspot” to the internet for my personal Macbook. I never used the company’s computer or network for that, of course.

No what i mean is, if you read the linked explanation it suggests iCloud (Legacy) uses Drive, while iCloud (CloudKit) uses a database technique. Hence on my employers macbook i use iCloud but drive is not allowed to be activatedm, so iCloud (Legacy) is not listed as an integration option anyway in DT. But CloudKit is. That is just confusing and i would think due to the description, that CloudKit would not be dependent on drive. Hence i deciced to leverage Bonjour, which i think is good enough for now.

Kind regards