Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Core Data CloudKit stops syncing after incomprehensible archive error
Ive been getting this error on an app in the dev environment since iOS16. it continues to happen in the latest iOS release (iOS18). After this error/warning, CoreData_CloudKit stops syncing and the only way to fix it is to delete the app from all devices, reset the CloudKit dev environment, reload the schema and reload all data. im afriad that if I ever go live and get this error in production there won't be a way to fix it given I cant go and reset the production CloudKit environment. It doesn't happen straight away after launching my app in a predictable manner, it can take several weeks to happen. Ive posted about this before here and haven't got a response. I also have a feedback assistant issue submitted in 2022 as part of ios16 beta that is still open: FB10392936 for a similar issue that caused the same error. would like to submit a code level support query but it doest seem to have anything to do with my code - but rather the Apple core data CloudKit syncing mechanism. anyone have any similar issues or
3
0
1.2k
Nov ’24
Reply to Core Data CloudKit stops syncing after incomprehensible archive error
as requested, I've created another feedback issue: FB15652576 on FB10392936, the error message is in the followup comments. here is the error from that issue - also an incomprehensible archive error. on that issue yes I had to lower the CloudKit operation rate to complete the upload - it took a month or 2 - it would be great if there was some mechanism for bulk uploads that bypass the throttles. But throttles shouldn't also corrupt the CloudKit database. not only would it throttle, but it would corrupt the database - the only way to recover was to reset the database and reload the schema and start from scratch- not possible in production. > [error] error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _importFinishedWithResult:importer:](1306): : Import failed with error: Error Domain=NSCocoaErrorDomain Code=4864 *** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x65, 0x78, 0x61) UserInfo={NSDebugDescription=***
Nov ’24
Not able to save file that is specific to macOS Sequoia
Supplying a complete copy the error from my log file below. Can someone tell me what changed in Sequoia that would be causing this error? If there a work around? Is there something I can do to correct this? Thanks, Ken 10.953 (I) DatabaseSaver.swift:207 phase1_startReadingRemoteDatabase(timeout:) Checking original database for out-of-band changes 10.975 (D) DatabaseSaver.swift:251 phase2_startResolvingConflict(localData:remoteData:remoteURL:) Original file is safe to overwrite. 10.975 (I) DatabaseSaver.swift:285 phase3_startWritingRemoteDatabase(resolvedData:) Writing database file 15.178 (E) LocalDataSource.swift:85 write(_:to:fileProvider:timeout:queue:completionQueue:completion:) Failed to write file [message: You don’t have permission to save the file “MyPasswords.kdbx” in the folder “Downloads”. 15.179 (E) FileAccessError.swift:217 make(from:fileName:fileProvider:) Failed to access the file [fileProvider: com.apple.FileProvider.LocalStorage, systemError: Error Domain=NSCocoaErrorDomain Code=513
1
0
553
Oct ’24
Non-Sandboxed App built with Xcode could read directory in Big Sur not Monterey
Error Domain=NSCocoaErrorDomain Code=257 The file “ReceiptScans” couldn’t be opened because you don’t have permission to view it. UserInfo={NSURL=file:///Users//Documents/ReceiptScans, NSFilePath=/Users//Documents/ReceiptScans, NSUnderlyingError=0x60000178e280 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}} I turned off sandboxing to make this work in Big Sur with Xcode 13.1 beta, but when I upgraded to Monterey and Xcode 13.1 I started getting the error again. let files: [URL] = try FileManager.default.contentsOfDirectory(at: path, includingPropertiesForKeys: nil, options: [FileManager.DirectoryEnumerationOptions.skipsHiddenFiles]) I checked and sandboxing is still turned off. I cleaned the build directory and recompiled. Can't make it work. Have the permissions been changed? Have some API's been changed? Because sandboxing is turned off I don't think I should have to use any special entitlements.
3
0
1.4k
Nov ’21
Reply to How to access files when running XCTests in Ventura. Currently I receive "unauthorised access" errors.
Hello, I am able to reproduce the issue with access permission on a fresh Xcode project. This is the error I get: The file theFile.json couldn’t be opened because you don’t have permission to view it. Error Domain=NSCocoaErrorDomain Code=257 NSUnderlyingError=0x600000ce6040 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted My setup is Xcode16 and Xcode15.4 in Applications (named Xcode16 and Xcode respectively) macOS Sonoma 14.7 Full disk access is given to Xcode. My original problem appeared in a Swift package structure SwiftPackage -- Sources -- Tests ---- PackageTests ------ Resources -------- theFile.json ------ TheUnitTest.swift // file where I try loading theFile.json If I understand correctly based on the reading material my issue is with one of these. App Sandbox or Mandatory access control (MAC) I am running the tests from Xcode. Any help appreciated. Thank you!
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’24
Decoding Error when starting a Live Activity via Push Notification
Hi, I'm a bit stuck when it comes to implementing live activities. I'm trying to start one by sending a push. my activity attributes looks like: import Foundation import ActivityKit public struct NeoPrototypeActivity: ActivityAttributes { public let classId: String public let name: String public let room: String public let startTime: Date public init(classId: String, name: String, room: String, startTime: Date) { self.classId = classId self.name = name self.room = room self.startTime = startTime } public struct ContentState: Codable & Hashable { public let participationState: ParticipationState public init(participationState: ParticipationState) { self.participationState = participationState } } } public enum ParticipationState: String, Codable, Hashable, Equatable { case upcoming case upcomingOnWaitingList case checkedIn case waitingList case lostSpot case lostSpotFromWaitingList case classCompleted public var description: String { switch self { case .upcoming: return Upcoming case .upcomingOnWaitingList
2
0
643
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): : enqueuing request: 2D00459F-8C08-4E9A-BC44-FCE1CD29A550 the enqueue fails with this: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke_2(1030): Failed to enqueue request: 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29 Error Domain=NSCocoaErrorDomain Code=134417 Request ' 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29' was cancelled because there
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
UIDocumentPickerViewController: Cannot access file from OneDrive
Hello everybody, I am struggling with accessing files from the Location OneDrive through UIDocumentViewController. The error says: Error Domain=NSCocoaErrorDomain Code=260 Die Datei „Testfile.txt“ konnte nicht geöffnet werden, da sie nicht existiert. UserInfo={NSFilePath=/private/var/mobile/Containers/Shared/AppGroup/11E04153-649E-416F-9860-2EA9C0913A18/File Provider Storage/item|1|18a17c69%2D5d6d%2D4b16%2Db388%2D4a9834e9440b/Testfile.txt, NSUnderlyingError=0x281202310 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}} The Controller is initialised the following way: let ctrl = UIDocumentPickerViewController(forOpeningContentTypes: [.image, .audio, .video, .item, .content]) And in the delegate method I do the following: func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { guard let documentUrl = urls.first else { return } guard documentUrl.startAccessingSecurityScopedResource() else { parent.errorText = Developer Error: Can't access secu
5
0
1.1k
Oct ’24
WorldTrackingProvider Not running. Arkitsession terminated
Hi everyone I am working on a small project that requires World Anchors so that I can persist my content through whenever the user chooses to leave/close the app. However I can't manage to make my Arkit session to run even though I think all the privacy permissions have been set and allowed correctly. Here is a sample code in an empty scene: // // WorldTrackingView.swift // SH_AVP_Demo // // Created by 李希 on 9/19/24. // import SwiftUI import RealityKit import RealityKitContent //import VisionKit import ARKit import Foundation import UIKit import simd struct WorldTrackingView_test: View { @State var myCube = Entity() @Environment(.scenePhase) var myScenePhase var body: some View { RealityView { content in //Load Scene if let Scene = try? await Entity.load(named: WorldTrackingScene, in: realityKitContentBundle){ //Add scene to the view content.add(Scene) //Look for the cube entity if let cubeEntity = Scene.findEntity(named: Cube){ myCube = cubeEntity // Create collission for the cube myCube.generateCollisionSha
2
0
702
Sep ’24
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 ' EF99499F-210C-4DB0-98F9-C10563CBD3D9' with result: storeIdentifier: 01B8CAF5-154B-47B9-81CC-5850C07D2836 success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 Request ' EF99499F-210C-4DB0-98F9-C10563CBD3D9' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'. UserInfo={NSLocalizedFailureReason=Request ' 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
NSFileManager contentsOfDirectoryAtPath:error: returns NSFileReadUnknownError with underlying POSIX EINTR
Our backup app (Arq) is encountering random errors for some users on macOS Sequoia. The method [NSFileManager contentsOfDirectoryAtPath:error:] returns nil with an NSError domain NSCocoaErrorDomain, code 256 (NSFileReadUnknownError). The NSError's NSUnderlyingError key is an NSError with domain NSPOSIXErrorDomain and code 4 (EINTR). Sometimes waiting and retrying works fine; sometimes 5 retries still fail. For some users it happens on different directories each time they try to back up. What is causing this? Are we supposed to use a different API to get directory contents these days?
1
0
553
Oct ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
Thanks for the suggestion, @DTS Engineer, I saved the sysdiagnose and filtered it to errors. This is using a basic example project from Xcode. I'm running it on iPhone and Mac and when saving items from iPhone I can see them appear in CloudKit database, but they don't get synced to the Mac. And these are 5 errors that are looping when the Mac is trying to sync (I assume): 1 error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1242): : Failed to set up CloudKit integration for store: (URL: file:///Users/admin/Library/Containers/ca.maybelater.SequoiaSync2/Data/Library/Application%20Support/default.store) 2 error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](2312): - Attempting recovery from error: 3 Error retrieving daemon to get network transfer endpoint: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.cloudd was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDesc
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
"Failed to retrieve app-scope key" in sandboxed app
Hi all.A customer of my app Yoink has an issue with it. When he tries to drag a file to it, the console reports this:Error Domain=NSCocoaErrorDomain Code=256 Failed to retrieve app-scope key UserInfo={NSDebugDescription=Failed to retrieve app-scope key}The app, as soon as it retrieves an NSURL via drag and drop, creates a security-scoped bookmark from it (the entitlements are set correctly, of course, because for me and everyone else who uses this app, except this one person, it works fine).So, now my question is, what causes Failed to retrieve app-scope key?The app creates the bookmark like this:NSURLBookmarkCreationOptions options = NSURLBookmarkCreationWithSecurityScope; NSData *bmData = [fileURL bookmarkDataWithOptions:options includingResourceValuesForKeys:nil relativeToURL:nil error:&err]; if (bmData == nil) bmData = [fileURL bookmarkDataWithOptions:options|NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess includingResourceValuesForKeys:nil relativeToURL:nil error:&err];(I repeat th
10
0
3.7k
May ’16
[macOS Sequoia] Sudden surge of "failed to retrieve app-scope key" logs and failed URL security scoping
Hello, with macOS Sequoia I've observed a sudden, substantial surge in reports about the Mac App Store version of my app Yoink no longer accepting files dropped to it, with the following message being logged in Console.app: 08:16:05.516307+0200 Yoink ---Yoink Error--- Could not create NSURL bookmark for /Users//Downloads//.txt err: Error Domain=NSCocoaErrorDomain Code=256 Failed to retrieve app-scope key UserInfo={NSDebugDescription=Failed to retrieve app-scope key} The code line that causes this is the following: NSData *bmData = [fileURL bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope includingResourceValuesForKeys:nil relativeToURL:nil error:&err]; Sometimes a relaunch of Yoink, or a restart of the Mac resolves the issue, but only temporarily. Other times, even a restart doesn't work, but running tccutil reset All at.EternalStorms.Yoink in Terminal and then restarting the Mac works (again, temporarily). The trial version and Setapp versions of my app both work as expected, howev
4
0
1.2k
Oct ’24
iOS Content Blockers Reload - Couldn’t communicate with a helper application
Hi everyone and thanks for your time. Intro I'm developing an iOS app that has Content Blockers as one of its features. For this, we have a list of predefined rules the user can enable/disable at will, and also an option to enter custom rules. Whenever there's a change (enable, disable, add or remove), I get all the rules and recreate the JSON files, one file for every 150K rules (we have more than one content blocker). Most users just need one JSON file though. And then call the content blockers reload. The Problem Most of the time, it works well. The content blocker reloads and I can verify in Safari that it's working. But, sometimes within the completionHandler of: SFContentBlockerManager.reloadContentBlocker(withIdentifier:completionHandler:) It returns the following error: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.SafariServices.ContentBlockerLoader UserInfo={NSDebugDescription=connection to service named com.apple.SafariServices.ContentBlockerLoader} Locali
2
0
1.2k
Mar ’23