我在为 Mac OS 公证我的应用程序时遇到问题,它不断向我抛出两个主要错误:
Error: Failed to staple your application with code: 65
另一个:
CloudKit query for Ringer.app (2/6616b14b31693a2da25c1fec0581258b1cdbfa19) failed due to "Record not found".
我尝试了很多方法来尝试解决这个问题,例如使用电子公证、电子构建器公证等不同的工具,以及使用电子构建器的内置工具。这些工具都不起作用。我尝试撤销并添加/下载我的代码签名证书。我还尝试更改我的证书的信任设置。这些都不起作用。
这是完整的错误日志:
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.
更有可能的是,您使用了错误类型的证书。
看看这个评论和上面的一些评论https://github.com/electron/notarize/issues/120#issuecomment-1382039042
我将在我的项目中检查这一点。我遇到了非常类似的错误。