universalJavaApplicationStub icon indicating copy to clipboard operation
universalJavaApplicationStub copied to clipboard

Sandboxing is not supported

Open kerner1000 opened this issue 3 years ago • 1 comments

I'm submitting a…

  • [X] bug report
  • [ ] feature request
  • [ ] other

Short description of the issue/suggestion:

after I run

'codesign' --force --options runtime --deep --entitlements "/Volumes/Case-sensitive Volume/sources/myall/assets/mac/entitlements.plist" --sign "3rd Party Mac Developer Application: Max Mustermannr (6W37Y53F4CM)" "/Volumes/Case-sensitive Volume/sources/myapp/target/MyApp/MyApp.app"

the app is not starting anymore. When I try to invoke the universalJavaApplicationStub, I get the following error:

target/MyApp/MyApp.app/Contents/MacOS/universalJavaApplicationStub: /Users/alex/Library/Containers/com.myapp/Data/target/MyApp/MyApp.app/Contents/MacOS/universalJavaApplicationStub: No such file or directory
target/MyApp/MyApp.app/Contents/MacOS/universalJavaApplicationStub: line 0: exec: /Users/alex/Library/Containers/com.myapp/Data/target/MyApp/MyApp.app/Contents/MacOS/universalJavaApplicationStub: cannot execute: No such file or directory
  • universalJavaApplicationStub version: latest
  • macOS version: 12.4
  • Java version(s): 18

kerner1000 avatar Jul 16 '22 20:07 kerner1000

The problem here is the 'Sandbox' flag in the entitlement.plistfile. If it is set to true, then somehow executable content is expected to be located in the /Users/<username>/Library/Containers directory.

Is it possible to account for this somehow?

Disabeling the Sandbox flag will recover this error, but subsequently won't let me upload the app to the App Store:

NSLocalizedFailureReason = "App sandbox not enabled. The following executables must include the \"com.apple.security.app-sandbox\" entitlement with a Boolean value of true in the entitlements property list: [( \"com.myapp.pkg/Payload/MyApp.app/Contents/MacOS/universalJavaApplicationStub\" )]

kerner1000 avatar Jul 19 '22 11:07 kerner1000