MacOS – Notes, Drive and Keychain not syncing to iCloud from Mojave

icloudmacosmojavenotes.app

This one is strange. I have one computer which is unable to fully sync with iCloud. What's odd is that some items do sync, including Calendar and Contacts. I suspect there's a corrupted / locked library file somewhere wreaking havoc, but I'm unsure of where to find it. The most telling fact is I've isolated the issue to user account level. None of the issues happen with a fresh user. Here's what I know:

Details:

Problematic computer is running 10.14.3 (Issue has persisted since 10.13)
In iCloud preference, Notes is checked on. So is iCloud Drive and just about everything except Keychain and Photos.
The affected computer does not display any notes created from other devices. And no notes created on the affected computer sync to my other devices.

When I attempt to enable Keychain on the affected computer, after entering my iCloud password I'm presented with an error saying "iCloud Keychain couldn’t be set up because there was a problem communicating with iCloud."
Other devices: iOS device running latest OS (no syncing issues), Mac running 10.13 (no syncing issues), Mac running 10.12 (no syncing issues)
Notes created on iCloud.com show up and sync as expected on all devices except the one Mac

Troubleshooting Steps (so far):

Signed out of iCloud, restarted, signed back in (about a dozen times)
Updated to latest version of Mojave
Attempted syncing on a new user account (and it WORKS!)
I've also reset user permissions on the home folder with diskutil resetuserpermissions / id -u

I don't know what combination of Containers, Application Support directories, and Preferences I'd need to target to resolve this, but I suspect if the correct set are deleted and regenerated the issue might go away. My goal is to get syncing to work in the current user account to avoid the headache of manually transferring over a fragile command line tools and preferences. But if I can't find any solutions soon I may have to just wave the white flag.

Best Answer

The Notes application for macOS has been very unreliable throughout MANY macOS's so including Mojave! Even in the time it was still written as Mac OS X. So even if you cure your Mac, which you could do and I explained in https://discussions.apple.com/thread/251096810 it will most likely be temporary and at some point in time you will notice that the continuous spinning wheel in Notes will get back to nag you. And the non-syncing will be back again.

A better way is to start using Notes through the web interface, on www.icloud.com directly, and bookmark Notes for direct access. Its interface is smooth and complete and will allow flawless syncing with all your other devices like you iPhone and iPad where you leave Notes on.

Notes on iOS and nowadays also iPadOS however is pretty stable. So if you you these in combination with the Notes web application through the icloud.com website your are fine.