Gurjinder Singh
Gurjinder Singh

Reputation: 10329

currentDiskUsage failed: Error Domain=NSCocoaErrorDomain Code=4097

My app is freezing and I am getting the following logs on console. I am not able to identify the issue.

currentDiskUsage failed: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.nsurlstorage-cache" UserInfo={NSDebugDescription=connection to service named com.apple.nsurlstorage-cache}; {     NSDebugDescription = "connection to service named com.apple.nsurlstorage-cache}

Thanks in advance.

Upvotes: 2

Views: 1952

Answers (1)

Steve Madsen
Steve Madsen

Reputation: 13791

Swooping in with an answer 4½ years later... (and mostly answering so future searchers can identify the error)

Cocoa error code 4097 is NSXPCConnectionInterrupted. Your app triggered something in the system to make an XPC connection, probably to an Apple service, and that connection was interrupted, possibly because the process vending the XPC service crashed.

This error, and many others in the Cocoa domain, can be found in FoundationErrors.h (easily opened in Xcode through File > Open Quickly...).

Upvotes: 1

Related Questions