Post

Replies

Boosts

Views

Activity

Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
UPDATE: After some time the sync fails again for no obvious reason and here is the error that appears in the console for a Mac app: CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate finishedAutomatedRequestWithResult:](3599): Finished request '<NSCloudKitMirroringExportRequest: 0x600002d8c140> EF99499F-210C-4DB0-98F9-C10563CBD3D9' with result: <NSCloudKitMirroringResult: 0x6000000bcb10> storeIdentifier: 01B8CAF5-154B-47B9-81CC-5850C07D2836 success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringExportRequest: 0x600002d8c140> EF99499F-210C-4DB0-98F9-C10563CBD3D9' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringExportRequest: 0x600002d8c140> EF99499F-210C-4DB0-98F9-C10563CBD3D9' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'.} Is this a sync attempt that's being cancelled?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
Well, after a while the other Mac with macOS 15.0.1 stopped syncing too. So the original report is still valid and I can reproduce it on two Macs with 15.0.1 and two iOS devices with iOS 18.1 b7. There is a simple project attached to FB15455847 which fails to sync after disabling / enabling iCloud and adding new items from all devices. Going through sysdiagnose again and following the steps in the article up to Execute the import All previous steps look fine but when it comes to enqueuing the request: default … 14:14:15.841814 … YourCoolApp CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke(1003): <NSCloudKitMirroringDelegate: …>: enqueuing request: <NSCloudKitMirroringImportRequest: …> 2D00459F-8C08-4E9A-BC44-FCE1CD29A550 the enqueue fails with this: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke_2(1030): Failed to enqueue request: <NSCloudKitMirroringImportRequest: 0x600001108690> 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29 Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringImportRequest: 0x600001108690> 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringImportRequest: 0x600001108690> 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.} and then it just loops over trying to execute that NSCloudKitMirroringImportRequest and failing: Request '<NSCloudKitMirroringImportRequest> ... was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'. and the import never happens.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
@DTS Engineer is it possible to escalate this? It's still happening in macOS 15.1.1 and I created a simple starter project where the problem is reproducible. Need to run the app on iOS and macOS and after a few minutes of using the app (creating items on iPhone and Mac) the sync breaks: https://www.icloud.com/iclouddrive/0f3lh5CfIuaE5Tb54PC5-gycg#SequoiaSync2 the logs only show this failure that I mentioned above: Request '<NSCloudKitMirroringImportRequest> ... was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’24