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.

I actually see the authentication prompts mentioned by cyclic, just before executing a CloudKit operation on beta 4. When I reject these prompts, I see error message "User rejected a prompt to enter their iCloud account password".

When I enter my credentials, I see the error message where this whole thread is about.

I'm not sure if it's relevant, but I only see the authentication prompt on devices without two factor authentication, every time when I start a new CloutKit operation.

It seems that Apple is experimenting in a very buggy way with new errors messages, while in the meantime we (third party app developers) can't proceed with our normal work.

Seeing the same error on both macOS 12 beta 4 and iOS 15 beta 4 simulator.

<CKError 0x600001a2dbc0: "Account Temporarily Unavailable" (1028/2011); "Account temporarily unavailable due to bad or missing auth token">

Filed FB9435854.

Seeing the same error - basic boiler plate code, so it's not program logic that's causing this.

Workaround (if you don't depend on iOS 15 APIs) is to use a Simulator device with a previous runtime like iOS 14.5, CloudKit works there.

Out of interest I've just confirmed that this error also occurs when I connect a physical iPad to the Mac and run the app there, so I don't believe it is a simulator error.

The Resolution status of the feedback report I made for Apple is now "Potential fix identified - In iOS 15".

Accepted Answer

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.

I think this is fixed with iOS 15 Beta 5. I updated, then launched my little hours-tracker app, and all the most recent data loaded up just fine.

Same here, beta 5 seems to have corrected the issue.

Fixed in beta 5.

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. 👍

iOS 15 beta 4 CloudKit Auth Error
 
 
Q