My .app won't launch on an M1 mac

Hi,

I've built everything natively for arm64, the M1 doesnt have Rosetta 2 installed. The app runs fine when started from the terminal.

I am packaging the .app exactly the same way as for x86_64 but it refuses to launch on an M1 mac.

I see "You do not have permission to open the application 'APPNAME'" when trying to open the app. I've tried when both codesigned and not codesigned (both work on x86 dev machine).

In Console.app I see:
Code Block
LAUNCH: Runningboard launch of com.mydomain.myapp <private> returned RBSRequestErrorFailed, error Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600007803450 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 111}}}, so returning -10826


The app launches using shell scripts, I've tried to modify the plist to launch the executable directly to see whether it was the issue, but it didnt change anything.

The way its starting makes me think it doesnt even try to launch the executable and that its failing right away when looking at something in the package, but I have no idea what it could be.

I've been at this for hours, any help would be appreciated.

Cheers



I see "You do not have permission to open the application 'APPNAME'"
when trying to open the app.

This user-level message indicates that there’s something wrong about the way that your app is packaged such that the system refuses to launch it. There are a variety of underlying causes. For example, and I must stress this this is just one example, is that the app was built for arm64e (we only support arm64e for KEXTs; third-party user-level code must be arm64).

If you try to run your app from Terminal, what do you see? For example, do something like this:

Code Block
% /Applications/QProcessDock.app/Contents/MacOS/QProcessDock


replace this example path with the path to your app’s main executable.

Share and Enjoy

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

I have the same issue. A .app that starts with a script in Contents/MacOS. Works fine on an Intel Mac or an M1 machine with Rosetta 2 installed. Does not work on an M1 Mac without Rosetta 2.

% open -a DecoderPro.app The application /Applications/JMRI/DecoderPro.app cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10826 "kLSNoLaunchPermissionErr: User doesn't have permission to launch the app (managed networks)" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2436, NSUnderlyingError=0x13d711060 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x13d711870 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 111}}}}} Starting the script works:% open DecoderPro.app/Contents/MacOS/StartJMRI  with no extra messages.

Somehow, starting on M1-only is doing something different from starting with M1-plus-Rosetta-2

Starting the script works

So your app’s main ‘executable’ is actually a script? I recommend against that, for a variety of reasons. What happens if you replace this with an actual executable?

Share and Enjoy

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

I've experienced the same issue with the Samsung Wireless Printer setup utility (Unknown error 111). It is not a script, however it's a somewhat older app that is not going to be updated by the vendor anymore. What helped me:

I've added the executable permissions on the app's binary: chmod +x AppName.app/Contents/MacOS/AppName

Then I've been able to start the app directly or from the terminal.

Hope this can also solve your issue.

My .app won't launch on an M1 mac
 
 
Q