Apple Silicon app builds but cannot launch

The new M1 Mac Mini is great, and I've had some success compiling various projects natively. However, I encountered an issue I'm not sure how to resolve.

In Xcode, the app builds but fails to run with the following dialog of cryptic errors:

Code Block text
Could not launch
Domain: IDELaunchErrorDomain
Code: 20
Recovery Suggestion: The LaunchServices launcher has return an error. Please check the system logs for the underlying cause of the error.
User Info: {
    DVTRadarComponentKey = 113722;
}
--
The operation couldn’t be completed. (OSStatus error -10826.)
Domain: NSOSStatusErrorDomain
Code: -10826
User Info: {
    "_LSFunction" = "_LSLaunchWithRunningboard";
    "_LSLine" = 2508;
}
--
The operation couldn’t be completed. Launched process exited during launch.
Domain: RBSRequestErrorDomain
Code: 5
Failure Reason: Launched process exited during launch.


Finder complains about permission when launching, and the Console reports this message:

Code Block text
Unable to obtain a task name port right for pid 2071: (os/kern) failure (0x5)


I thought it could be a signing issue and have tried automatic, manual, codesign and every option I can find for the app and associated libraries. I've tried this in Xcode 12.2 and the 12.3 Beta and haven't been able to find any helpful answers online.

I'm not sure what to try next. Anyone have more insight into these error messages or at least another place I can look to find details?

Thanks 🙂

I had the same problem. Try to:

  • Clean project
  • Delete the DerivedData folder
  • Restart your laptop

This steps resolved the issue for me.

Apple Silicon app builds but cannot launch
 
 
Q