Getting error stack trace when working NSPersistentCloudKitContainer in iOS - core-data

I am trying to build a very basic app using Core Data and CloudKit. I am logged into my CloudKit account on my Mac, and I followed the instructions to run the sample project that Apple provided on their website.
Using the sample project as a guide, I tried to build a simpler app using the instructions provided here.
However, after building trying to run my sample project, I get the following error stack trace in my console:
CoreData: debug: CoreData+CloudKit: -[PFCloudKitOptionsValidator validateOptions:andStoreOptions:error:](35): Validating options: <NSCloudKitMirroringDelegateOptions: 0x60000097f960> containerIdentifier:iCloud.com.cybermedia.CloudKitTest1 initializeSchema:YES ckAssetThresholdBytes:<null> operationMemoryThresholdBytes:<null> useEncryptedStorage:NO automaticallyDownloadFileBackedFutures:NO automaticallyScheduleImportAndExportOperations:YES skipCloudKitSetup:NO preserveLegacyRecordMetadataBehavior:NO useDaemon:YES apsConnectionMachServiceName:<null> containerProvider:<PFCloudKitContainerProvider: 0x600002f602e0> scheduler:<null> notificationListener:<null> containerOptions:<null>
storeOptions: {
NSInferMappingModelAutomaticallyOption = 1;
NSMigratePersistentStoresAutomaticallyOption = 1;
NSPersistentCloudKitContainerOptionsKey = "<NSPersistentCloudKitContainerOptions: 0x600002d73960>";
NSPersistentHistoryTrackingKey = 1;
NSPersistentStoreMirroringOptionsKey = {
NSPersistentStoreMirroringDelegateOptionKey = "<NSCloudKitMirroringDelegate: 0x600001c7dc20>";
};
}
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _setUpCloudKitIntegration](355): <NSCloudKitMirroringDelegate: 0x600001c7dc20>: Successfully enqueued setup request.
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest](1854): <NSCloudKitMirroringDelegate: 0x600001c7dc20>: Checking for pending requests.
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest]_block_invoke(1866): <NSCloudKitMirroringDelegate: 0x600001c7dc20>: Executing: <NSCloudKitMirroringDelegateSetupRequest: 0x60000232c2a0> 6D32A278-F996-438D-AA8D-950F438F6402
2019-07-06 01:10:45.443340-0400 CloudKitTest1[14002:3818396] [error] error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(769): <NSCloudKitMirroringDelegate: 0x600001c7dc20>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x600001274000> (URL: file:///Users/fsyed/Library/Developer/CoreSimulator/Devices/2A838B6E-EF14-4F54-9230-7B747A6DDE9B/data/Containers/Data/Application/249463B2-7348-4DBA-9739-0DDEB0ECBA10/Library/Application%20Support/CloudKitTest1.sqlite)
Error Domain=NSCocoaErrorDomain Code=134400 "Unable to initialize without an iCloud account (CKAccountStatusNoAccount)." UserInfo={NSLocalizedFailureReason=Unable to initialize without an iCloud account (CKAccountStatusNoAccount).}
CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(769): <NSCloudKitMirroringDelegate: 0x600001c7dc20>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x600001274000> (URL: file:///Users/fsyed/Library/Developer/CoreSimulator/Devices/2A838B6E-EF14-4F54-9230-7B747A6DDE9B/data/Containers/Data/Application/249463B2-7348-4DBA-9739-0DDEB0ECBA10/Library/Application%20Support/CloudKitTest1.sqlite)
Error Domain=NSCocoaErrorDomain Code=134400 "Unable to initialize without an iCloud account (CKAccountStatusNoAccount)." UserInfo={NSLocalizedFailureReason=Unable to initialize without an iCloud account (CKAccountStatusNoAccount).}
2019-07-06 01:10:45.444373-0400 CloudKitTest1[14002:3818396] [error] error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](1259): <NSCloudKitMirroringDelegate: 0x600001c7dc20> - Attempting recovery from error: Error Domain=NSCocoaErrorDomain Code=134400 "Unable to initialize without an iCloud account (CKAccountStatusNoAccount)." UserInfo={NSLocalizedFailureReason=Unable to initialize without an iCloud account (CKAccountStatusNoAccount).}
CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](1259): <NSCloudKitMirroringDelegate: 0x600001c7dc20> - Attempting recovery from error: Error Domain=NSCocoaErrorDomain Code=134400 "Unable to initialize without an iCloud account (CKAccountStatusNoAccount)." UserInfo={NSLocalizedFailureReason=Unable to initialize without an iCloud account (CKAccountStatusNoAccount).}
2019-07-06 01:10:45.445456-0400 CloudKitTest1[14002:3818396] [error] error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromError:withMonitor:](1398): <NSCloudKitMirroringDelegate: 0x600001c7dc20> - Failed to recover from error: Error Domain=NSCocoaErrorDomain Code=134400 "Unable to initialize without an iCloud account (CKAccountStatusNoAccount)." UserInfo={NSLocalizedFailureReason=Unable to initialize without an iCloud account (CKAccountStatusNoAccount).}
Recovery encountered the following error: (null)
CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromError:withMonitor:](1398): <NSCloudKitMirroringDelegate: 0x600001c7dc20> - Failed to recover from error: Error Domain=NSCocoaErrorDomain Code=134400 "Unable to initialize without an iCloud account (CKAccountStatusNoAccount)." UserInfo={NSLocalizedFailureReason=Unable to initialize without an iCloud account (CKAccountStatusNoAccount).}
Recovery encountered the following error: (null)
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _finishedRequest:withResult:](1883): Finished request: <NSCloudKitMirroringDelegateSetupRequest: 0x60000232c2a0> 6D32A278-F996-438D-AA8D-950F438F6402 with result: <NSCloudKitMirroringResult: 0x600002304ea0>
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest](1854): <NSCloudKitMirroringDelegate: 0x600001c7dc20>: Checking for pending requests.
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest]_block_invoke(1869): <NSCloudKitMirroringDelegate: 0x600001c7dc20>: No more requests to execute.
I keep getting the error:
NSLocalizedFailureReason=Unable to initialize without an iCloud account
Can anyone see or help me identify what it is I'm doing wrong?

You need to sign in to your iCloud account on the simulator

Related

How can I fix this 'Unable to connect to the Parse API' error

Unhandled Runtime Error
Error: XMLHttpRequest failed: "Unable to connect to the Parse API"
Call Stack
handleError
node_modules\moralis\lib\browser\RESTController.js (445:0)
Check if your server is active/online in the admin dashboard.

NSPersistentCloudKitContainer “Import failed because applying the accumulated changes hit an unhandled exception.” Error

When I use NSPersistentCloudKitContainer to sync data, I receive error Import failed because applying the accumulated changes hit an unhandled exception.:
CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _requestAbortedNotInitialized:](1826): <NSCloudKitMirroringDelegate: 0x282f3c180> - Never successfully initialized and cannot execute request '<NSCloudKitMirroringExportRequest: 0x2815d8180> B7974D4D-C5DA-413E-AE3B-072C88D38D47' due to error: Error Domain=NSCocoaErrorDomain Code=134421 "Import failed because applying the accumulated changes hit an unhandled exception." UserInfo={NSLocalizedFailureReason=Import failed because applying the accumulated changes hit an unhandled exception., NSUnderlyingException=*** NSAllocateMemoryPages(103626821) failed}
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _finishedRequest:withResult:](2713): Finished request: <NSCloudKitMirroringExportRequest: 0x2815d8180> B7974D4D-C5DA-413E-AE3B-072C88D38D47 with result: <NSCloudKitMirroringResult: 0x281b51060> success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134406 "Request 'B7974D4D-C5DA-413E-AE3B-072C88D38D47' was aborted because the mirroring delegate never successfully initialized due to error: Error Domain=NSCocoaErrorDomain Code=134421 "Import failed because applying the accumulated changes hit an unhandled exception." UserInfo={NSLocalizedFailureReason=Import failed because applying the accumulated changes hit an unhandled exception., NSUnderlyingException=*** NSAllocateMemoryPages(103626821) failed}" UserInfo={NSLocalizedFailureReason=Request 'B7974D4D-C5DA-413E-AE3B-072C88D38D47' was aborted because the mirroring delegate never successfully initialized due to error: Error Domain=NSCocoaErrorDomain Code=134421 "Import failed because applying the accumulated changes hit an unhandled exception." UserInfo={NSLocalizedFailureReason=Import failed because applying the accumulated changes hit an unhandled exception., NSUnderlyingException=*** NSAllocateMemoryPages(103626821) failed}}
Apple Developer Forums Link
Memory issue fixed in iOS 15.5.

An unknown server-side error occurred while processing the command. Original error: Failed to locate opened application window with appId

Class Initialization method xxxxx.Features.PublicAppFeature.FeatureSetup threw exception. OpenQA.Selenium.WebDriverException: OpenQA.Selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Failed to locate opened application window with appId: xxxxxxxxxxxxxxxxx, and processId: xxxx.
An Application opened on the Remote machine. But they failed with the above error.
Run on Azure Pipeline on a Self-hosted machine(Window Server 2019 Datacenter)
Application is opened on the machine.
AppiumOptions options = new AppiumOptions();
options.AddAdditionalCapability("app", AppPath);
options.AddAdditionalCapability("ms:waitForAppLaunch", $"{SecondsToWaitOnOpen}");
options.AddAdditionalCapability("ms:experimental-webdriver", false);
session = new WindowsDriver(WindowsApplicationDriverUrl, options);

Hyperledger Febric Error : Channel:mychannel received discovery error:access denied

I was trying to run fabric-samples/asset-transfer-basic/application-javascript/app.js file
but got discovery error.
It is showing discovery error after I gave command "node app.js"
Delete
user.id
appUser.id
identities from your /home/pritam/fabric-samples/asset-transfer-basic/application-javascript/wallet directory.
The error that occurred is already documented in the app.js file that exists under the asset-transfer-basic directory:
// NOTE: If you see kind an error like these:
/*
2020-08-07T20:23:17.590Z - error: [DiscoveryService]: send[mychannel] - Channel:mychannel received discovery error:access denied
******** FAILED to run the application: Error: DiscoveryService: mychannel error: access denied
OR
Failed to register user : Error: fabric-ca request register failed with errors [[ { code: 20, message: 'Authentication failure' } ]]
******** FAILED to run the application: Error: Identity not found in wallet: appUser
*/
// Delete the /fabric-samples/asset-transfer-basic/application-javascript/wallet directory
// and retry this application.
//
// The certificate authority must have been restarted and the saved certificates for the
// admin and application user are not valid. Deleting the wallet store will force these to be reset
// with the new certificate authority.

Error: Failed to connect before the deadline URL:grpc://localhost:7051

:~/Documents/test/education/LFS171x/fabric-material/tuna-app/$ node query.js
Store path:/home/*******/Documents/test/education/LFS171x/fabric-material/tuna-app/hfc-key-store
Successfully loaded user1 from persistence
2020-02-11T05:56:10.423Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpc://localhost:7051
Query has completed, checking results
error from query = Error: Failed to connect before the deadline URL:grpc://localhost:7051
at checkState (/home/******/Documents/test/education/LFS171x/fabric-material/tuna-app/node_modules/fabric-client/node_modules/grpc/src/client.js:883:16) {
connectFailed: true
}
Im experimenting Hyperledger Fabric, using this link for reference,
Successfully registered admin and user, using registerAdmin.js and registerUser.js.
I am currently facing this error after running node query.js.
I need help troubleshooting this error,
Error: Failed to connect before the deadline
URL:grpc://localhost:7051.
Platform: Ubuntu 18.04,
Experimenting hyperledger fabric using Local Environment.
Thanks in advance.

Resources