Invalid encryption key - CloudKit (newbie)

Hi - Day 1 with DEVONthink so I am just trying to get set up on both the Mac and iPhone.

On the Mac, I created a database and set up sync using CloudKit with an encryption key.

I downloaded DEVONthink To Go and in the preferences, set up sync also using CloudKit with the same encryption key.

However I just get an error message: ā€œiCloud (CloudKit) (Invalid encryption key)ā€ and nothing has synced.

I KNOW itā€™s the same encryption key as I use a password manager and have also manually checked it.

Did I maybe miss a step?

I tried uninstalling and reinstalling the app on the phone but got the same message.

I have read other messages about similar problems but the suggestion was to clean the sync store and set up the sync from scratch. I donā€™t actually know how to do that with CloudKit. Or whether it is going to help. TIA

Just to add to this: I found instructions that said to uninstall DTTG, then on the Mac, right click on the sync location and choose ā€œclean locationā€. However, this option is greyed out. I can only ā€œshow infoā€ or ā€œremove locationā€. Why would that be?

Welcome to DEVONthink.

I have no experience with encryption keys not working as expected, but just working through what you say it is indeed a mystery, and a mystery why the ā€œcleanā€ not active. My hunch is that there is not yet a successful upload of the files (neither databases nor backups, by the way) DEVONthink needs to sync. So, if I were in this situation, I would:

  • Do the ā€œremove locationā€ action on the Apple CloudKit location. ā€œCleanā€ or whatever you see on the iPhone. This will allow you to start fresh.
  • on Mac setup sync again to Apple CloudKit, Select one or more databases to sync. Should start the sync automatically (see the spinning ball). This puts something into Appleā€™s CloudKit servers. The time it takes depends on the size of your databases and any network throttling that Apple may chose to do.
  • After complete, then setup sync on iPhone pointing to Apple CloudKit with same credentials, of course.

Also, please consider using Bonjour for synching. Will work quickly and more reliably than using any Third Party internet sync servers. As itā€™s Bonjour, works only when on the same local network. You can have both Bonjour and Apple CloudKit configured.

See @BLUEFROGā€™s explanation at Bonjour Simplified and of course refer to the outstanding DEVONthink Handbook.

Thank you very much for this detailed response. It sounds like Iā€™m best off wiping the sync setup (as best I can given no ā€˜cleanā€™ option) and starting afresh. Interesting point about Bonjour. Iā€™d actually discounted it as an option because I was thinking ā€œit wonā€™t work when Iā€™m out and about and not on the same networkā€ but Iā€™d just have to be careful to only use it on 1 device while out.

True, but canā€™t you just rely on it ā€œcatching upā€ when you get back? Sync is rarely time-sensitive since whatever device you have with you has the files you may need/want. I donā€™t think I understand your concern about ā€œbe careful to use on only 1 deviceā€. Use both if you want. Just sync wonā€™t happen but I donā€™t think (just me) that matters.

And I think you can get Apple CloudKit working ā€¦

A second welcome @bec :slight_smile:

I also suggest reading this postā€¦

Iā€™d verify the encryption key you added on the Mac.

  1. Do a Spotlight search for Keychain and open the Keychain Access application.
  2. In the logins section on the left, look for a key named DEVONcloudy Encryption (name of service) like DEVONcloudy Encryption (Dropbox).
  3. Double-click it and check the Show password checkbox. You will be required to enter your Administrative password. (This is the password you use to log into your machine with.)
  4. Press Allow (or Always Allow, if desired) and the password will be shown.
  5. Take note of the password, then quit Keychain Access.

In DEVONthink To Goā€™s Settings > Sync: Locations, tap the Edit link, then tap the sync location to open the sync store properties.
Enter the encryption key in both fields and press Save.

I would just add that I still find iCloud incredibly slow at times. I often have to use Cirrus to kick it into life ā€“ https://eclecticlight.co/cirrus-bailiff/. Even Appleā€™s Reminders can take a surprisingly long time to sync. So maybe it is not impossible that iCloud is just taking its time to do what it is supposed to do.

1 Like

Ok well I did get the CloudKit sync working (thanks @rmschne !) but have now decided Iā€™d prefer to use Bonjour after all! Not least because CloudKit is using a massive amount of space in iCloud and I had to upgrade my storage.

If I simply remove the CloudKit sync location, will all the DEVONthink data be deleted from iCloud?

Well done. The proper way is to ā€œcleanā€ the sync location first. Read in the DEVONthink Handbook details for this.