iOS 15 beta 4 CloudKit Auth Error

I'm seeing auth failures when attempting CloudKit operations:

"Account Temporarily Unavailable" (36/1028); "Account temporarily unavailable due to bad or missing auth token"

I see this for Modify zone operations, Modify records, and zone changes too. Everything. Only started happening after updating to iOS 15 beta 4 and Xcode 13 beta 4.

Account status is "available".

Answered by iturrajoel in 684303022

iOS 15 Beta 5 fixed the problem that my ad-hoc app was having on the devices with beta 4.

Hopefully, there will be an Xcode beta 5 today, too.

Im still seeing the problem in Beta 5. AT first I thought it was working as one simulator was correctly connecting, but then running it on a second simulator (or on a real device) resulted in no updates to CloudKit from the new devices, and the auth token error came back.

Interestingly, the first simulator that ran the program continues to communicate correctly with iCloud.

Can someone please try the following to confirm it's not just me:

  1. Create a new project with CoreData and CloudKit enabled
  2. Make the boiler plate changes to correct the on-screen behaviour (the View body should be as below)
  3. Set the deployment target to iOS 15
  4. Add the background -> remote notifications capability
  5. Add the iCloud -> CloudKit capability
  6. Connect to an existing container (creating a new container seems to be troublesome, with CloudKit console unable to list the new zones)
  7. Build and run on one simulator (log messages should indicate success)
  8. Build and run on a second simulator (log messages may display "auth token" error

That's in advance to anyone who can confirm this.

Andy

Working boilerplate body here:

NavigationView{

            List {

                ForEach(items) { item in

                    Text("Item at \(item.timestamp!, formatter: itemFormatter)")

                }

                .onDelete(perform: deleteItems)

            }

            .toolbar {

                #if os(iOS)

                ToolbarItem(placement: .bottomBar) {

                    EditButton()

                }

                #endif

                ToolbarItem(placement: .primaryAction) {

                    Button(action: addItem) {

                        Label("Add Item", systemImage: "plus")

                    }

                }

            }

        }

This is NOT fixed with beta 5.

Two problems related to NSPersistentCloudkitContainer persist since beta 4. I've submitted a bug report to Apple - no response yet.

The issues:

  1. "Account temporarily unavailable due to bad or missing auth token" when using the Development Environment (device or simulator), despite being signed in and despite it working on beta 1, 2 & 3.

  2. When using the App Store version of my App (in the Production Environment) on an iOS 15 device (beta 4 & 5), the syncing appears to start but nothing syncs. The app crashes to the springboard after a minute without warning.

Crash reports are vague but I have captured a CloudKit sysdiagnose and sent it to Apple in the hope they can decipher it. I really hope they sort this out as it's going to render my currently available app useless if iOS15 is released in this state and my users install it.

Everything appears fixed for me in Beta 5. I don’t use NSPersistentCloudkitContainer, just staight CloudKit calls. I wish Apple was more diligent in documenting this in release notes though. There’s nothing about this in Xcode or iOS beta release notes.

Beta 5 seems to have solved the issue on iOS for me, however the Watch OS 8 Beta 4 (still don't have 5 to test) still has the same issue.

I can confirm this issue (for me) has now been fixed in Watch OS Beta 5 as well. 👍

Is anyone still seeing this issue? I am not, but one of my customers is still getting the error with iOS and watchOS Beta 8.

iOS 15 beta 4 CloudKit Auth Error
 
 
Q