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

  • CKErrorDescription=Account temporarily unavailable due to bad or missing auth token

  • CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _scheduleAutomatedImportWithLabel:activity:completionHandler:]_block_invoke(2775): <NSCloudKitMirroringDelegate: 0x28326c0c0> - Finished automatic import - SandboxImport - with result: <NSCloudKitMirroringResult: 0x280722dc0> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134410 "(null)" UserInfo={NSUnderlyingError=0x280987db0 {Error Domain=CKErrorDomain Code=36 "CKInternalErrorDomain: 1028" UserInfo={NSUnderlyingError=0x2809a7900 {Error Domain=CKInternalErrorDomain Code=1028 "Account temporarily unavailable due to bad or missing auth token" UserInfo={CKErrorDescription=Account temporarily unavailable due to bad or missing auth token, NSLocalizedDescription=Account temporarily unavailable due to bad or missing auth token, NSUnderlyingError=0x2809a69d0 {Error Domain=CKInternalErrorDomain Code=2011 "Couldn't get an authentication token" UserInfo=0x2812a2200 (not displayed)}}}, CKErrorDescription=Account temporarily unavailable due to bad or missing auth token, NSDebugDescription=CKInternalErrorDomain: 1028, NSLocalizedDescription=Account temporarily unavailable due to bad or missing auth token}}}

  • I’ll also add that I see this across two different applications that I use CloudKit in

Accepted Reply

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.

  • Jinx! I can confirm that. Works for me, too.

  • Beta 5 has not resolved this for me (Just running a boiler place new project - can someone else please do a new project boiler plate build and confirm that they are seeing the same?)

  • Not working for me in beta 5 at all. This all started with beta 4 (see my post below).

Add a Comment

Replies

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

  • The error still occurs occasionally:

    CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _requestAbortedNotInitialized:]: <NSCloudKitMirroringDelegate: 0x282cd0180> - Never successfully initialized and cannot execute request '<NSCloudKitMirroringExportRequest: 0x2817055f0> AE07DDE0-1EA2-4763-8E05-ADCCD54DE320' due to error: <CKError 0x2816d2a30: "Account Temporarily Unavailable" (36/1028); "Account temporarily unavailable due to bad or missing auth token">

    CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _finishedRequest:withResult:]: Finished request: <NSCloudKitMirroringExportRequest: 0x2817055f0> AE07DDE0-1EA2-4763-8E05-ADCCD54DE320 with result: <NSCloudKitMirroringResult: 0x281979b80> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134406 "Request 'AE07DDE0-1EA2-4763-8E05-ADCCD54DE320' was aborted because the mirroring delegate never successfully initialized due to error: <CKError 0x2816d2a30: "Account Temporarily Unavailable" (36/1028); "Account temporarily unavailable due to bad or missing auth token">" UserInfo={NSLocalizedFailureReason=Request 'AE07DDE0-1EA2-4763-8E05-ADCCD54DE320' was aborted because the mirroring delegate never successfully initialized due to error: <CKError 0x2816d2a30: "Account Temporarily Unavailable" (36/1028); "Account temporarily unavailable due to bad or missing auth token">}

  • Same here for my Feedback, recent similar reports = more than 10, resolution: Potential fix identified.

Add a Comment

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.

  • Jinx! I can confirm that. Works for me, too.

  • Beta 5 has not resolved this for me (Just running a boiler place new project - can someone else please do a new project boiler plate build and confirm that they are seeing the same?)

  • Not working for me in beta 5 at all. This all started with beta 4 (see my post below).

Add a Comment

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")

                    }

                }

            }

        }

  • Just running it again, the auth errors have stopped, but the data is different in the two simulators (data created on each device locally appears to be persistent on the respective devices, but there is no synchronisation)

Add a Comment

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.

  • I am getting extremely variable results. Just now I have two simulators running the same boilerplate app, one simulator has 2 items, 1 simulator has 1 item, and now CloudKit dashboard is showing all three items... Just bizarre!

  • Installed my App Store app on a new device running iOS beta 5 to see what happens. All data syncs down to it just fine except for data created on the main device since beta 4. There is a clear temporal delineation. Creating a new item 'starts' an upload but nothing is uploaded and it eventually crashes. Sigh...

Add a Comment

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.