Launch Constraint Violation

When I try to launch my own Java app, I get the following error message.

xpcproxy exited due to OS_REASON_CODESIGNING | Launch Constraint Violation, error info: c[5]p[1]m[1]e[0], (Constraint not matched) launch type 3, failure proc [vc: 1]: /bin/bash

As far as I know, the failing process path is /bin/bash.

This issue is only happening on macOS Sequoia. The Java app works without any issue on MacOS Sonoma or any previous macOS versions. I did not make any changes, including launch constraints or any other settings. After updating to macOS Sequoia, I started getting this error and can no longer launch my app.

Thank you so much.

Answered by DTS Engineer in 809181022

You should definitely file a bug about that. Make sure to include:

  • A copy of your app.

  • A sysdiagnose log taken on the macOS 15 machine immediately after reproducing the problem.

Please post your bug number, just for the record.

If you need to work around this immediately, I suspect that the trampoline code that I link to in On File System Permissions will do the trick.

Share and Enjoy

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

By “app” do you mean something with an icon? And that users launch by double clicking that icon in the Finder?

Share and Enjoy

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

Currently dealing with the same issue, very frustrating. Did not change anything in my java app, just upgraded to MacOS Sequoia and now it doesn't launch.

However I did find a workaround which is to right click the app, show package contents, and find the executable inside the /MacOS folder and run that - app launches fine.

I've tried re-packaging, re-signing and notarizing everything but to no success.

It’s better to reply as a reply, rather than in the comments. It’s easy for me to miss the latter. See Quinn’s Top Ten DevForums Tips for this and other titbits.

Yes, that is correct.

OK.

So your app is packaged in a .app bundle. What does Contents/Info.plist have in its CFBundleExecutable property? That should be the name of a file in the Contents/MacOS directory. What type of file is that?

Just to set the stage here, I suspect you’re bumping into another incarnation of a general issue: It’s a really bad idea to use a shell script as the main executable of your app. I talk about this, in a different context, in the TCC and Main Executables section of On File System Permissions.

Share and Enjoy

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

Hi, Quinn. The value for "CFBundleExecutable" is universalJavaApplicationStub. It is a bash script that serves as a launcher stub.

Thanks for confirming.

As I said, I’m not a fan of using a script as the main executable for an app, but I’m surprised it broke this badly. Lemme confirm my understanding of this:

  1. You have a GUI app that just happens to be written in Java.

  2. On macOS 14, you launch it from the Finder and it works.

  3. On macOS 15, you launch it in the same way and it fails, logging the launch constraint failure that you included in your first post.

Is that right?

Share and Enjoy

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

Yes, Quinn. That is correct. Before macOS 15, I can launch it from the Applications in Finder by double clicking on the app icon. But now, I cannot anymore. The error message is "The application "MyJavaApp" can't be opened". When I checked the console, I saw it was the launch constraint failure.

Thank you so much.

You should definitely file a bug about that. Make sure to include:

  • A copy of your app.

  • A sysdiagnose log taken on the macOS 15 machine immediately after reproducing the problem.

Please post your bug number, just for the record.

If you need to work around this immediately, I suspect that the trampoline code that I link to in On File System Permissions will do the trick.

Share and Enjoy

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

Thanks a lot for your answers, Quinn. I really appreciate it. I will give your suggestions a try.

@AKMin I was able to get my application working correctly by changing my packaging method over to jpackage.

I was previously using javapackager which seems like it was not bundling the application correctly and executing it via a shell script - the 'universalJavaApplicationStub'.

Using jpackage I bundle the app as an app-image, sign all the files, then create a .dmg from the app-image and sign and notarize that and all is working now.

Hope this helps!

Launch Constraint Violation
 
 
Q