CoreData: warning: CoreData+CloudKit

I use NSPersistentCloudKitContainer. It seems that it the data synced in iCloud after a few seconds. However, I get the following warnings in the console. I do not understand what is it for.

Code Block
CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(813): <NSCloudKitMirroringDelegate: 0x280b051e0>: Successfully set up CloudKit integration for store: <NSSQLCore: 0x280024a00> (URL: file:///private/var/mobile/Containers/Shared/AppGroup/89D9D17C-03DF-48E4-83C3-DB23A8FE0D6F/TestData.sqlite)


Code Block
CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndScheduleImportIfNecessary:]_block_invoke(2033): <NSCloudKitMirroringDelegate: 0x280b051e0>: Scheduling automated import with activity: <CKSchedulerActivity: 0x281f51590; additionalXPCActivityCriteria={
    Priority = Utility;
}, containerID=<CKContainerID: 0x283c612e0; containerIdentifier=iCloud.io.test.testData, containerEnvironment="Sandbox">, identifier=com.apple.coredata.cloudkit.activity.import, priority=2>



Could you please explain what is this warning for and what should I do to fix it?

Replies

I doubt it will lead to a top crasher but I can't find the cause:

Exception Type: EXCCRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC
CORPSENOTIFY
Triggered by Thread: 5

Last Exception Backtrace:
0 CoreFoundation 0x1995525ac
exceptionPreprocess + 220 (NSException.m:199)
1 libobjc.A.dylib 0x1ad5cc42c objc
exceptionthrow + 60 (objc-exception.mm:565)
2 CloudKit 0x19f3734fc -[CKScheduler
submitActivity:withCriteria:] + 520 (CKScheduler.m:145)
3 CloudKit 0x19f377020 -[CKScheduler getDeviceCountForActivity:completionHandler:] + 432 (CKScheduler.m:561)
4 CloudKit 0x19f375c20 -[CKScheduler getSuggestedXPCActivityCriteriaForActivity:completionHandler:] + 960 (CKScheduler.m:371)
5 CloudKit 0x19f373204 -[CKScheduler submitActivity:] + 332 (CKScheduler.m:91)
6 CoreData 0x19f727cc0 _65-[NSCloudKitMirroringDelegate checkAndScheduleImportIfNecessary:]blockinvoke2 + 352 (NSCloudKitMirroringDelegate.m:2305)
7 CoreData 0x19f618410 developerSubmittedBlockToNSManagedObjectContextPerform + 164 (NSManagedObjectContext.m:3880)
8 libdispatch.dylib 0x199150ac8 dispatchclientcallout + 20 (object.m:559)
9 libdispatch.dylib 0x19915ec8c
dispatchlanebarriersyncinvokeandcomplete + 60 (queue.c:998)
10 CoreData 0x19f4e5b9c -[NSManagedObjectContext performBlockAndWait:] + 268 (NSManagedObjectContext.m:3997)
11 CoreData 0x19f727af0 _65-[NSCloudKitMirroringDelegate checkAndScheduleImportIfNecessary:]blockinvoke + 272 (NSCloudKitMirroringDelegate.m:2260)
12 CoreData 0x19f777704 -[PFCloudKitStoreMonitor performBlock:] + 116 (PFCloudKitStoreMonitor.m:140)
13 CoreData 0x19f71f0e8 -[NSCloudKitMirroringDelegate checkAndScheduleImportIfNecessary:] + 204 (NSCloudKitMirroringDelegate.m:2255)
14 CoreData 0x19f721824 -[NSCloudKitMirroringDelegate
importFinishedWithResult:importer:] + 312 (NSCloudKitMirroringDelegate.m:1041)
15 CoreData 0x19f721684 _57-[NSCloudKitMirroringDelegate performImportWithRequest:]blockinvoke2 + 256 (NSCloudKitMirroringDelegate.m:1004)
16 CoreData 0x19f680250
70-[PFCloudKitImporter databaseFetchFinishWithContext:error:completion:]blockinvoke + 1000 (PFCloudKitImporter.m:275)
17 CoreData 0x19f777704 -[PFCloudKitStoreMonitor performBlock:] + 116 (PFCloudKitStoreMonitor.m:140)
18 CoreData 0x19f67fe4c -[PFCloudKitImporter databaseFetchFinishWithContext:error:completion:] + 344 (PFCloudKitImporter.m:216)
19 CoreData 0x19f67fc50
54-[PFCloudKitImporter importIfNecessaryWithCompletion:]blockinvoke2.83 + 52 (PFCloudKitImporter.m:133)
20 libdispatch.dylib 0x19914efd0 dispatchcallblockandrelease + 32 (init.c:1454)
21 libdispatch.dylib 0x199150ac8
dispatchclientcallout + 20 (object.m:559)
22 libdispatch.dylib 0x199157c08 dispatchlaneserialdrain + 580 (inlineinternal.h:2548)
23 libdispatch.dylib 0x199158768
dispatchlaneinvoke + 460 (queue.c:3862)
24 libdispatch.dylib 0x199162528 dispatchworkloopworkerthread + 708 (queue.c:6590)
25 libsystempthread.dylib 0x1e0aac908 pthreadwqthread + 276 (pthread.c:2194)
26 libsystem
pthread.dylib 0x1e0ab377c start_wqthread + 8

I have the same problem and my app is being rejected by Apple. I could not replicate the crash but I get crash report. the only clue is the warning message in the console:

CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1093): <NSCloudKitMirroringDelegate: 0x28045c7e0>: Successfully set up CloudKit integration for store (1F2E3F9B-9DD9-4D61-9DB9-ADD2A3DE9D8D): <NSSQLCore: 0x102117db0> (URL: file:///var/mobile/Containers/Data/Application/AAF688C5-D8C2-4A5E-A87D-B6F04537A941/Library/Application%20Support/shared.sqlite)
CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke_2(990): Failed to enqueue request: <NSCloudKitMirroringExportRequest: 0x281e65720> 82E677A0-8E75-470A-A5CC-59BBC6C53D38
CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate finishedAutomatedRequestWithResult:](3372): Finished request '<NSCloudKitMirroringExportRequest: 0x281e65720> 82E677A0-8E75-470A-A5CC-59BBC6C53D38' with result: <NSCloudKitMirroringResult: 0x2833f6730> storeIdentifier: 0811C705-3EB2-4C73-BC5B-B96B43E4F2E0 success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringExportRequest: 0x281e65720> 82E677A0-8E75-470A-A5CC-59BBC6C53D38' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringExportRequest: 0x281e65720> 82E677A0-8E75-470A-A5CC-59BBC6C53D38' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'.}
Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001b5cab3e4
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [32025]

Triggered by Thread:  0

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libswiftCore.dylib            	       0x1b5cab3e4 _assertionFailure(_:_:file:line:flags:) + 264
1   BookShelf                     	       0x1025dc790 closure #1 in CoreDataStack.persistentContainer.getter + 690064 (CoreDataStack.swift:0)
2   BookShelf                     	       0x1025db82c CoreDataStack.persistentContainer.getter + 686124 (<compiler-generated>:0)
3   BookShelf                     	       0x102584c60 closure #1 in SplashView.body.getter + 330848 (SplashView.swift:40)
4   BookShelf                     	       0x1025848c8 SplashView.body.getter + 329928 (SplashView.swift:34)
5   SwiftUI                       	       0x1bf7bb6ec 0x1bf75f000 + 378604
6   SwiftUI                       	       0x1bf7a7830 0x1bf75f000 + 297008
7   SwiftUI                       	       0x1bf79494c 0x1bf75f000 + 219468
8   SwiftUI                       	       0x1bf7b2c80 0x1bf75f000 + 343168
9   SwiftUI                       	       0x1bfd75310 0x1bf75f000 + 6382352
10  AttributeGraph                	       0x1dfe36e48 AG::Graph::UpdateStack::update() + 520
11  AttributeGraph                	       0x1dfe36748 AG::Graph::update_attribute(AG::data::ptr<AG::Node>, unsigned int) + 424
12  AttributeGraph                	       0x1dfe35490 AG::Subgraph::update(unsigned int) + 864
13  SwiftUI                       	       0x1bf77d85c 0x1bf75f000 + 125020
14  SwiftUI                       	       0x1c0b43928 0x1bf75f000 + 20859176
15  SwiftUI                       	       0x1c018d8a8 0x1bf75f000 + 10676392
16  SwiftUI                       	       0x1bf77aeac 0x1bf75f000 + 114348
17  SwiftUI                       	       0x1bf774bb0 0x1bf75f000 + 89008
18  SwiftUI                       	       0x1bf76f008 0x1bf75f000 + 65544
19  SwiftUI                       	       0x1c0b438f0 0x1bf75f000 + 20859120
20  SwiftUI                       	       0x1c0b437dc 0x1bf75f000 + 20858844
21  SwiftUI                       	       0x1bf83bbd0 0x1bf75f000 + 904144
22  SwiftUI                       	       0x1bf76c820 0x1bf75f000 + 55328
23  SwiftUI                       	       0x1bf76c748 0x1bf75f000 + 55112
24  SwiftUI                       	       0x1bf76c984 0x1bf75f000 + 55684
25  CoreFoundation                	       0x1bbf5b234 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
26  CoreFoundation                	       0x1bbee5410 __CFRunLoopDoObservers + 532
27  CoreFoundation                	       0x1bbf4519c __CFRunLoopRun + 1028
28  CoreFoundation                	       0x1bbf4a3ec CFRunLoopRunSpecific + 612
29  GraphicsServices              	       0x1f6b5835c GSEventRunModal + 164
30  UIKitCore                     	       0x1be2d6f58 -[UIApplication _run] + 888
31  UIKitCore                     	       0x1be2d6bbc UIApplicationMain + 340
32  SwiftUI                       	       0x1bf91bc50 0x1bf75f000 + 1821776
33  SwiftUI                       	       0x1bf8821ec 0x1bf75f000 + 1192428
34  SwiftUI                       	       0x1bf86c294 0x1bf75f000 + 1102484
35  BookShelf                     	       0x10253c0c8 main + 32968 (<compiler-generated>:0)
36  dyld                          	       0x1db46cdec start + 2220