When I wanted to build a new version yesterday one of the targets built successfully while the second failed during the stapling phase. The notarization is done from a Python script and the notarization per se worked for both targets and returned no error.
"xcrun stapler staple <target.app>" returns the following error description when executed from the build script for one of the targets:
Processing: <target.app>
Certificate trust evaluation did not return expected result. (5) [leaf AnchorApple AnchorTrusted ChainLength IntermediateMarkerOid LeafMarkersProdAndQA SSLHostname ServerAuthEKU ValidityPeriodMaximums]
Certificate trust evaluation for 24.134.186.233 did not return expected result. CSSMERRTPNOTTRUSTED.
Certificate trust evaluation did not return expected result. (5) [leaf AnchorApple AnchorTrusted ChainLength IntermediateMarkerOid LeafMarkersProdAndQA SSLHostname ServerAuthEKU ValidityPeriodMaximums]
Certificate trust evaluation for 24.134.186.233 did not return expected result. CSSMERRTPNOTTRUSTED.
Could not establish secure connection to api.apple-cloudkit.com
error is Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=<NSLocalizedDescription=cancelled, NSErrorFailingURLKey=<URL I'm obviously not allowed to post here>
CloudKit's response is inconsistent with expections: (null)
The staple and validate action failed! Error 68.
Any idea what might be causing this?
When I'm running the "xcrun stapler staple <target.app>" command from the Terminal it works but it has worked from the build script before and it also works for the other target. I'm a bit lost as I don't know what to look into. Thanks in advance!