app can't be opened, even if signed and notarized.

I'm developing an electron app using electron-builder

I code-signed and notarized it and can confirm with codesign and spctl commands like below:

% codesign --verify --deep --verbose ./MyApp.app
./MyApp.app: valid on disk
./MyApp.app: satisfies its Designated Requirement

% spctl -a -vvv -t install ./MyApp.app 
./MyApp.app: accepted
source=Notarized Developer ID
origin=Developer ID Application: XXXXX.,Ltd. (XXXX)

But I cannot open it as if weren't signed.

"MyApp" can't be openend"

If I try to open it in terminal with open command:

The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10810 "kLSUnknownErr: Unexpected internal error" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2735, NSUnderlyingError=0x600003aa0900 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600003aa09c0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}}}

What could be wrong here? I'm strongly suspecting that my apple developer program and certificate has some issues. As this happened after I renew my program this month.

Or could there be some other reason for this error?

Answered by DTS Engineer in 805366022

I have a bunch of advice on this front in Resolving Trusted Execution Problems. In your case I specifically recommend:

  • Test in an isolated environment, to make sure it’s not just your machine having problems. See Testing a Notarised Product.

  • Once you’ve reproduce the problem there, run syspolicy_check to see what it reports.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I have a bunch of advice on this front in Resolving Trusted Execution Problems. In your case I specifically recommend:

  • Test in an isolated environment, to make sure it’s not just your machine having problems. See Testing a Notarised Product.

  • Once you’ve reproduce the problem there, run syspolicy_check to see what it reports.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

app can't be opened, even if signed and notarized.
 
 
Q