No way to make Agenda sync except switching to another Apple ID

It seems that Agenda won’t sync through iCloud under my Apple ID,
but it works well under another new-created Apple ID.

What I did and what happened:

Clear all data and try sync

  1. I uninstalled Agenda both on Mac and iOS.
  2. Then I removed the iCloud data of Agenda on iCloud Storage Management Panel.
  1. After that, I re-installed Agenda and opened it. The sync indicator said Agenda was Downloading. It kept showing downloading, even till next day.
  • I hadn’t added any notes yet, and there should be no data on iCloud as I performed a deletion not long ago.
    image
  1. I added a few notes and pictures.

  2. The notes didn’t sync, and they still didn’t after a day. The sync indicator on both devices kept showing Downloading. :worried:

  3. The iCloud Storage Management Panel still showed that Agenda took up 265.5K. No changes happened.


Switching to another Apple ID

  1. I closed Agenda, signed out my Apple ID and signed in with a new Apple ID I just created.
  2. I reopened Agenda. Soon the sync indicator disappeared. Notes are synced. The iCloud Storage Management Panel showed that Agenda took up 3.6M of space. Everything went perfectly. :sunglasses:
  3. I closed Agenda and deleted the cloud data in iCloud Storage Management Panel. This time, Agenda disappeared completely from the list.
  4. I reopened Agenda. Soon the sync indicator disappeared again. I found again that Agenda took up 3.6M from the iCloud Storage Management Panel.

Switching back to the previous Apple ID

  1. I closed Agenda, signed out of this new Apple ID, and signed back into my original Apple ID.
  2. I reopened Agenda. The sync indicator still kept showing Downloading. The iCloud Storage Management Panel told me that Agenda still took up 265.5K of space.

What I expected: Agenda can be sync through iCloud again, under my main Apple ID.

Things that might be helpful to know (Agenda version, OS and model, etc):
Agenda version: 12.0.2 (MAS), 12.0.2 on iOS
OS: macOS 11.2.3, iOS 14.4.2

Sorry you are having this issue.

It’s best not to switch iCloud accounts. Signing out is OK, but switching to another account can cause all sorts of strange problems with apps.

265KB is very little data. It is probably just the cloud database info. It is less than one JPEG.

If you want to reset the cloud data with Agenda, I recommend you let Agenda do it. Resetting it in the iCloud settings goes behind the back of the app, and is not very trustworthy in my experience.

How to recover? I would try this:

  1. Sign in to the iCloud account you want to use
  2. Now restart the device completely
  3. Turn on the sync in Agenda if needed.
  4. Wait 10 seconds, and then turn off the sync in Agenda again. You should be asked if you want to remove the cloud data. Do that. Remove the cloud data
  5. Wait 10 minutes
  6. Turn on the sync again.

Hopefully it will upload and you will be OK again.

Drew

Thanks Drew!
I’ve tried your steps for a few times, but it didn’t work for me. The sync inspector still keep showing it is downloading once I turn on iCloud sync.

I have gathered some information that I hope will help.

From Activity Monitor I find that Agenda keeps writing to disk and was taking up a high CPU.

From Console, I find that Agenda keeps encountering the following errors.

E CloudKitService.swift(322) : downloadOperations() : Error downloading changes: Optional(<CKError 0x6000020f95c0: "Partial Failure" (2/1011); "Couldn't fetch some items when fetching changes"; uuid = 48A27444-C884-4904-9945-D6B576B73E46; container ID = "iCloud.com.momenta.agenda"; partial errors: {

    Settings:__defaultOwner__ = <CKError 0x6000020f1b30: "Zone Not Found" (26/2036); server message = "Zone does not exist"; uuid = 48A27444-C884-4904-9945-D6B576B73E46>

}>)
E CloudService.swift(356) : processUpdate(of:info:completionHandler:) : Processing remote updates failed <CKError 0x6000020f95c0: "Partial Failure" (2/1011); "Couldn't fetch some items when fetching changes"; uuid = 48A27444-C884-4904-9945-D6B576B73E46; container ID = "iCloud.com.momenta.agenda"; partial errors: {

    Settings:__defaultOwner__ = <CKError 0x6000020f1b30: "Zone Not Found" (26/2036); server message = "Zone does not exist"; uuid = 48A27444-C884-4904-9945-D6B576B73E46>

}>
E RevisionManager.swift(621) : operations(for:) : Failed to process update store <AgendaFoundation.Store:0x600001494000> (device identifier: E6D60183-0511-42ED-BC4C-AE0A2BDF3408, url path: /Volumes/TF1/macAdditionalUsersHome/abc/Library/Group Containers/WRBK2Z2EG7.group.com.momenta.agenda.macos/Release/Application/Stores/1AF873AA-E488-4528-8FA4-26B33E2A1422.agenda-document) by service cloudKitService due to error: <CKError 0x6000020f95c0: "Partial Failure" (2/1011); "Couldn't fetch some items when fetching changes"; uuid = 48A27444-C884-4904-9945-D6B576B73E46; container ID = "iCloud.com.momenta.agenda"; partial errors: {

    Settings:__defaultOwner__ = <CKError 0x6000020f1b30: "Zone Not Found" (26/2036); server message = "Zone does not exist"; uuid = 48A27444-C884-4904-9945-D6B576B73E46>

}>

Thanks again Drew!

Hmm, so you tried turning off the sync in Agenda, and when it asked, you chose to remove the cloud data. Correct?

Can you try that again, and check for errors from doing that? Ie just turning off the sync and removing the data? That might give a clue.

Something else you could try:

  1. Turn off the sync in Agenda and remove the cloud data when asked
  2. Restart the device
  3. Start the sync.

Yeah, that’s right.

I tried that again and these two errors appeared, only once.
Then Agenda was no longer written to the disk, took up 0% CPU.

E CloudService.swift(356) : processUpdate(of:info:completionHandler:) : Processing remote updates failed interrupted
E RevisionManager.swift(621) : operations(for:) : Failed to process update store <AgendaFoundation.Store:0x600001ca52b0> (device identifier: E6D60183-0511-42ED-BC4C-AE0A2BDF3408, url path: /Volumes/TF1/macAdditionalUsersHome/abc/Library/Group Containers/WRBK2Z2EG7.group.com.momenta.agenda.macos/Release/Application/Stores/2A8EC24D-8479-43AB-93EC-29BF5C5F36FA.agenda-document) by service cloudKitService due to error: interrupted

I also tried to turn off sync, remove data, then restart and turn on sync. Still not working.

OK, I guess I will have to test this, ie, clearing the cloud data via the Settings app. Will see what I can find.

OK, I spent some time on this. It seems we weren’t handling one of the errors that could arise when you manually remove the data. I have fixed it, and it will be in v13.

Not sure what you can do in the meantime. I guess you are on the beta, correct? If so, the next release should have the fix.

One thing you could possibly try is turning off the Agenda Switch in the iCloud section of Settings app, opening Agenda, waiting a few minutes, and then going back and turning on the iCloud Agenda switch again. Perhaps that will trigger an error that does the appropriate reset.

Kind regards,
Drew

That’s awesome!!! I really appreciate you!!! :man_dancing:t2: :man_dancing:t2: :man_dancing:t2: :man_dancing:t2: :man_dancing:t2: :dancing_women: :dancing_women: :dancing_women: :dancing_women: :dancing_women: :dancing_men: :dancing_men: :dancing_men: :dancing_men: :dancing_men: :dancing_men: :dancing_men: :dancing_men: :dancer:t2: :dancer:t2: :dancer:t2: :dancer:t2: :dancer:t2: :dancer:t2:

1 Like

Hi, Drew.
I tried the latest beta and I found the problem remained.
But the error messages changed to:

default	17:40:03.067044+0800	Agenda	E CloudKitService.swift(322) : downloadOperations() : Error downloading changes: Optional(<CKError 0x6000021b00c0: "Partial Failure" (2/1011); "Couldn't fetch some items when fetching changes"; uuid = C9314B03-08F0-4AA0-8EE3-403C9627EE4E; container ID = "iCloud.com.momenta.agenda"; partial errors: {
	Settings:__defaultOwner__ = <CKError 0x6000021a8cf0: "User Deleted Zone" (28/2042); server message = "Zone was purged by user"; uuid = C9314B03-08F0-4AA0-8EE3-403C9627EE4E>
}>)
default	17:40:03.067208+0800	Agenda	E CloudService.swift(357) : processUpdate(of:info:completionHandler:) : Processing remote updates failed <CKError 0x6000021b00c0: "Partial Failure" (2/1011); "Couldn't fetch some items when fetching changes"; uuid = C9314B03-08F0-4AA0-8EE3-403C9627EE4E; container ID = "iCloud.com.momenta.agenda"; partial errors: {`
 	Settings:__defaultOwner__ = <CKError 0x6000021a8cf0: "User Deleted Zone" (28/2042); server message = "Zone was purged by user"; uuid = C9314B03-08F0-4AA0-8EE3-403C9627EE4E>
 }>
default	17:40:03.067362+0800	Agenda	E RevisionManager.swift(621) : operations(for:) : Failed to process update store <AgendaFoundation.Store:0x600001548270> (device identifier: 24A05B70-051B-4137-B335-EDF9D6B0AB13, url path: /Users/tonny/Library/Group Containers/WRBK2Z2EG7.group.com.momenta.agenda.macos/Release/Application/Stores/B830532C-8DFE-483B-82A5-D34820B959DB.agenda-document) by service cloudKitService due to error: <CKError 0x6000021b00c0: "Partial Failure" (2/1011); "Couldn't fetch some items when fetching changes"; uuid = C9314B03-08F0-4AA0-8EE3-403C9627EE4E; container ID = "iCloud.com.momenta.agenda"; partial errors: {
	Settings:__defaultOwner__ = <CKError 0x6000021a8cf0: "User Deleted Zone" (28/2042); server message = "Zone was purged by user"; uuid = C9314B03-08F0-4AA0-8EE3-403C9627EE4E>
}>

*Agenda kept occurring these errors, writing to disk, and taking up a high CPU.

The errors can be normal output, can you make sure you leave the app running for a while. It will do a complete resync so it’s normal that it will take up high CPU for a while as it processes things. If after an hour or so it still doesn’t get better, please let us know.

1 Like

Hey Alex and Drew,
I have tried several times and waited for hours but the error persists.
From the iCloud storage management UI, it appears that nothing was being uploaded. The space Agenda taken up still remains 265.5K. And no content was synced between devices either.

OK, will take another look tomorrow. Thanks for the feedback!

1 Like

Just to be sure, did you already try to “turn off sync, choosing to remove cloud data, and turn it on again” trick with the new beta?

If that doesn’t help, I will have to setup again and try to reproduce the problem. The previous attempt did lead to a problem, but it was fixed by the new changes.

To be clear, the issues all began when you pressed Delete all Files on the Mac? Correct? That may be a difference. I was testing with iOS devices.

I’m at a bit of a loss with this one. I have spent a couple of hours resetting the cloud data, but every time, my devices end up recovering, uploading new data, and continue syncing.

Do you have a lot of data? Is it possible you aren’t giving it enough time to upload the data? The sync process is an upload then a download. You may need to have both devices online for a while to get them to sync. On iOS devices, attach to power, and turn off the autolock, and leave Agenda in the foreground. On Macs, turn off the sleep and attach to power.

And make sure all devices have the new beta, of course.

Great news your guys! CloudKit is sailing again on my account! And it has been sailing steadily for several days.:sailboat::wind_face:

I repeated those steps I posted on the first floor with the 185 beta, specifically these steps:

  1. Uninstall Agenda, then reinstall.
  2. Signed out of iCloud, then signed in with another ID, and finally switched back.
  3. The sync started About five minutes later, and then it went smoothly.*
  4. Later, on iOS, I uninstalled, reboot, and reinstalled Agenda. And the CloudKit set sail itself.:wind_face:

I assume switching accounts is still a valid approach. Maybe it’s fighting fire with fire lol. Anyway, I did it!

Celebrate!!!:tada:

Thank you Drew!!! Thanks for all your hard work and support!!! And Alex!!! :cowboy_hat_face:


*The console messages are as below, by the time I switched back the iCloud account:

default	00:24:27.894857+0800	Agenda	I CloudService.swift(297) : start(inSuspendedState:) : AgendaFoundation.CloudKitService starts processing remote updates


default	00:29:31.842562+0800	Agenda	E CloudKitService.swift(322) : downloadOperations() : Error downloading changes: Optional(<CKError 0x60000220fb70: "Partial Failure" (2/1011); "Couldn't fetch some items when fetching changes"; uuid = 00D365E7-227B-4AA8-81D9-30DB34FD54B2; container ID = "iCloud.com.momenta.agenda"; partial errors: {
	D71FF7F6-0EBA-4546-B08B-666AF8B11C96:__defaultOwner__ = <CKError 0x6000023f5f20: "Change Token Expired" (21/2026); server message = "client knowledge differs from server knowledge"; uuid = 00D365E7-227B-4AA8-81D9-30DB34FD54B2>
}>)
1 Like

Wow, that was a journey. Glad it is working again for you!

It’s a shame we never really got to the bottom of it. On the plus side, I tested this a lot, and did find some issues. But in the testing at least, I got to a point where I could reset, see a few errors, but then it would recover, which is what we are aiming for.

Best stay away from the “Delete” button in the iCloud settings in future :rofl:

Drew

1 Like