Im having an issue with notarizing my app for Mac Os where it keeps throwing two main errors at me:
Error: Failed to staple your application with code: 65
and the other:
CloudKit query for Ringer.app (2/6616b14b31693a2da25c1fec0581258b1cdbfa19) failed due to "Record not found".
Ive tried a number of thun gs to try and fix this like using dirrfent tools like electron-notarize, electron-builder-notarize, and using the build-in one for electron-builder. None of these tools worked. I tried revoking and adding/downloading my code signing certificate. I also tried changing the trust settings for my certificate. None of these things worked.
Here is the full error log:
2024-09-04T16:23:55.183Z - Error: Failed to staple your application with code: 65
Processing: /path/to/Ringer.app
Properties are {
NSURLIsDirectoryKey = 1;
NSURLIsPackageKey = 1;
NSURLIsSymbolicLinkKey = 0;
NSURLLocalizedTypeDescriptionKey = Application;
NSURLTypeIdentifierKey = "com.apple.application-bundle";
"_NSURLIsApplicationKey" = 1;
}
Props are {
cdhash = {length = 20, bytes = 0x6616b14b31693a2da25c1fec0581258b1cdbfa19};
digestAlgorithm = 2;
flags = 65536;
secureTimestamp = "2024-09-04 16:22:22 +0000";
signingId = "com.example.app";
teamId = TEAM_ID;
}
JSON Data is {
records = (
{
recordName = "2/2/6616b14b31693a2da25c1fec0581258b1cdbfa19";
}
);
}
Headers: {
"Content-Type" = "application/json";
}
Domain is api.apple-cloudkit.com
Response is <NSHTTPURLResponse: 0x15c805720> { URL: https://api.apple-cloudkit.com/database/1/com.apple.gk.ticket-delivery/production/public/records/lookup } { Status Code: 200, Headers {
Connection = (
"keep-alive"
);
"Content-Encoding" = (
gzip
);
"Content-Type" = (
"application/json; charset=UTF-8"
);
Date = (
"Wed, 04 Sep 2024 16:23:55 GMT"
);
Server = (
"AppleHttpServer/b866cf47a603"
);
"Strict-Transport-Security" = (
"max-age=31536000; includeSubDomains;"
);
"Transfer-Encoding" = (
Identity
);
Via = (
"xrail:st53p00ic-qujn13071302.me.com:8301:24R363:grp60,631194250daa17e24277dea86cf30319:f14d246dadd971461f6eeb141bc3c9ed:usdal2"
);
"X-Apple-CloudKit-Version" = (
"1.0"
);
"X-Apple-Edge-Response-Time" = (
27
);
"X-Apple-Request-UUID" = (
"85c634a0-a676-4e88-867a-d41f3052962a"
);
"X-Responding-Instance" = (
"ckdatabasews:16305701:st42p63ic-ztfb09161601:8807:2423B470:dc6eb160027793833b3454f7e31c59d833eb82d1"
);
"access-control-expose-headers" = (
"X-Apple-Request-UUID,X-Responding-Instance,Via"
);
"x-apple-user-partition" = (
63
);
} }
Size of data is 165
JSON Response is: {
records = (
{
reason = "Record not found";
recordName = "2/2/6616b14b31693a2da25c1fec0581258b1cdbfa19";
serverErrorCode = "NOT_FOUND";
}
);
}
CloudKit query for Ringer.app (2/6616b14b31693a2da25c1fec0581258b1cdbfa19) failed due to "Record not found".
Could not find base64 encoded ticket in response for 2/6616b14b31693a2da25c1fec0581258b1cdbfa19
The staple and validate action failed! Error 65.
More likely, you use a wrond type of certificate. “Mac Development” (for dev) instead of ‘Apple Developer ID” (for outsise appstore distribution).
Look at this comment and a few above https://github.com/electron/notarize/issues/120#issuecomment-1382039042
I’m going to check this on my project. I faced a very similar error.