When checking that a .dmg file is correctly stapled with the command
xcrun stapler validate -v file.dmg
I intermittently get errors like
Properties are {
NSURLIsDirectoryKey = 0;
NSURLIsPackageKey = 0;
NSURLIsSymbolicLinkKey = 0;
NSURLLocalizedTypeDescriptionKey = "Disk Image";
NSURLTypeIdentifierKey = "com.apple.disk-image-udif";
"_NSURLIsApplicationKey" = 0;
}
Codesign offset 0x1eb82c90 length: 15891
Stored Codesign length: 15891 number of blobs: 5
Total Length: 15891 Found blobs: 5
Props are {
cdhash = {length = 20, bytes = 0x07d207070853a23966374ae1b36e921148b3a5f3};
digestAlgorithm = 2;
flags = 73728;
secureTimestamp = "2024-07-26 06:08:31 +0000";
signingId = "SIGNED-file.dmg...
[ Message content over the limit has been removed. ]
}
Headers: {
"Content-Type" = "application/json";
}
Response is (null)
error is Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x6000012b4a80 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <82266119-065E-480C-B012-F30B48DB0F44>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <82266119-065E-480C-B012-F30B48DB0F44>.<1>"
), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://api.apple-cloudkit.com/database/1/com.apple.gk.ticket-delivery/production/public/records/lookup, NSErrorFailingURLKey=https://api.apple-cloudkit.com/database/1/com.apple.gk.ticket-delivery/production/public/records/lookup, _kCFStreamErrorDomainKey=4}
I am not able to pin down the cause of this, could it be rate limiting on the API? Any other thoughts as to the cause?
Thanks.
could it be rate limiting on the API?
That seems unlikely. As you can probably infer the from the verbose log, stapler
simply uses URLSession
to fetch the ticket from a CloudKit database. That’s failing with -1001, aka NSURLErrorTimedOut
. That’s at transport error, meaning that there was a problem transporting the request to the server or getting the response back. If you were rate limited [1], you wouldn’t see this error, but some something from the server itself.
I suspect that this is being triggered by networking conditions, and specifically network conditions near you. If you want to dig deeper, the next step is a packet trace to see what’s happening on the wire.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] And, to be clear, I’m not even sure there is a rate limit for such requests.