c-smile / sciter-js-sdk

Sciter.JS - Sciter but with QuickJS on board instead of my TIScript
BSD 3-Clause "New" or "Revised" License
1.64k stars 97 forks source link

Binaries not running on macOS 11.3.1 (M1) #96

Closed Janiczek closed 3 years ago

Janiczek commented 3 years ago

System:

Screenshot 2021-05-08 at 23 30 31

I get an error when trying to open any apps in the Sciter.JS SDK:

$ open bin/macosx/usciterjs.app
The application 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=2539, NSUnderlyingError=0x1220109a0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x12200bd10 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 111}}}}}
$ open bin/macosx/glfw-opengl.app
The application 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=2539, NSUnderlyingError=0x15b1133b0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x15b114700 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 111}}}}}
$ open bin/macosx/inspector.app
The application 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=2539, NSUnderlyingError=0x12f7176a0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x12f712a70 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 111}}}}}

Are there some other steps to run the apps? Do I perhaps need to build them on my own from the Xcode projects?

c-smile commented 3 years ago

Umm... and what is not clear in this phrase "User doesn't have permission to launch the app" ?

Files copied from the web, to be executed, need to have permission from you.

Check: https://www.macinstruct.com/tutorials/how-to-set-file-permissions-in-mac-os-x/

wdcossey commented 3 years ago

Here's a link to the Stack Overflow solution for Big Sur.

https://stackoverflow.com/a/65010167

Here's another possible solution for downloaded apps

https://github.com/onmyway133/blog/issues/750

Janiczek commented 3 years ago

Here's what I see after chmod -R 755, xattr and codesign:

https://user-images.githubusercontent.com/149425/117572889-48277480-b0d5-11eb-910b-3a028135dd1b.mp4

c-smile commented 3 years ago

Try to compile executables on your machine: https://github.com/c-smile/sciter-js-sdk/tree/main/build/macosx

c-smile commented 3 years ago

And libsciter.dylib should also have execute permissions I guess.

Janiczek commented 3 years ago

Here's what I tried

The last one finally built and ran successfully after running

sudo xattr -dr com.apple.quarantine bin/macosx/libsciter.dylib

So, the binaries downloaded with the SDK are not usable for M1 users but building one of the demos at least results in something runnable:

Screenshot 2021-05-10 at 13 10 54

Thanks for pointing me in the right direction.


This is probably off topic, but: am I correct in assuming scapp is how I should package/distribute apps (if not needing some more extensive C++ integration), and usciter is just a development environment (hot reload etc.)?

c-smile commented 3 years ago

scapp is used by Sciter.Quark that can be used to generate monolithic executables that contain as sciter as resources.

Janiczek commented 3 years ago

Thanks for all the help and explanations!