-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable hardened runtime for macOS #3383
Comments
I got a You can try it by changing
I spotted that after searching for the error the notarization service was giving me Then to sign the app, run:
Take When it's done uploading it will output a UUID, run this command to check when it's done notarizing (it will also send you an email):
If it succeeded, you can then staple the package with:
The issue now is that the app crashes when signed like that. Here's the dump in case someone finds it handy. I wonder if it works for anyone else? Will try on a dummy app when I get a chance. |
Same issue for our app. Looks like initialisation of JS env is crashing |
Thanks @dariocravero, awesome, I will try your suggestions, for now is not a priority for our app to be notarized but still necessary for the future, when I have results, I will share here in case that it helps to others. Regards! |
It looks like Hardened Runtime is now supported (electron/osx-sign#176). I haven't tried it in our app yet, but from looking at dotnet/macios#4288 I think the |
I'm having a problem with my app where when hardenedRuntime is enabled, the app will crash immediately upon launch without any visible error messages. If I launch from the command line I see this:
|
@noahott it looks like it failed to change the permissions on a section of memory to |
Not sure how helpful it is, but there is an electron-notarize module in electron-userland. It would be great if electron-builder can automatically notarize macOS apps during packaging! |
@rajivshah3, regarding your last comment on December 1st 2018, have you added hardenedRuntime support to electron-builder? The documentation for electron-osx-sign has a "TODO" statement for electron-builder support. |
just realize this has been implemented in |
https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/ 21.0.10 (not yet released):
I am fighting with Apple support to restore my account (bloody useless security questions), but I hope next week will be first-class support for notarization. |
…ess by default to false Close electron-userland#3383
I've added the allow-jit entitlement, along with a few others and am still getting the same error on launch. com.apple.security.cs.allow-jit Anything else you can think to try for this? |
@noahott Hi I am experiencing the same issue but with the The entitlements can be viewed with the following command: May this be an issue. I suspect Electron expects a plist instead of a bplist when setting the permissions. Apple rejected our App because of a crash and I think its because of this issue. I just discovered the Again, here ist he log I get:
There is no issue with the dmg version of the app, it is successfully notarized and signed. The Any input on this issue. |
@noahott I just checked the "Console" Application (The one used for viewing log). I discovered the following log entry (after filtering for the Application name): Do you get the same log message? |
@idoodler I'm not finding any console log messages with "OSUnserializeXML" |
I added "entitlementsInherit": "entitlements.darwin.plist" and i no longer get the SetPermissions error, but my app still crashes with a different error now
|
@noahott thx for your reply. I already have set the property |
Just a follow up on my 'bplist' issue. We abandoned the macOS application for quite some time, after an platform upgrade session (node.js, electron and its dependencies) everything semes to work again. So no 'bplist', but a proper 'plist'. |
With the recent release of macOS Mojave, Apple give us the option to upload a macOS app to be notarized to distribute outside the AppStore to don't have any problem with Gatekeeper. I tried to figure out how to enable the hardened runtime for an Electron app but without success, the first option that I think, was entitlements but isn't, so have the option to enable hardened runtime will be a great feature for macOs distribution outside the AppStore.
I'm a web/mobile developer and don't have all the knowledge how is builded electron and if it's possible enable this feature, to I want to be humble and if this options is impossible to implement or crazy, my apologize in advance.
Refs:
Solution we'd like
If it's possible, have an option in the build configuration to enable the hardened runtime for mac os applications.
Alternatives considered
Not any at this time, but if we can have something similar to react-native, nativescript or cordova, where we have the option to access the native projects and tweak if its necessary will be great
Additional context
The hardened runtime only can be enabled with xcode, because is a flag in the project.pbxproj file and is only available trough native apps with xcode, so the
xcodebuild
tool when create the archive and sign the app, enable this flag. I don’t now how exactly electron works but I think that have like a template with a compiled app and theelectron-builder
for example, only replace and bundle the content inside.Enable hardened runtime (macOS)
The text was updated successfully, but these errors were encountered: