macOS Hardened runtime, notarization, code signing: app crashes and doesn't work at all
See original GitHub issueWhich version of electron-builder are you using?
- Version: 20.44.4
Which version of electron are you using?
- Version: 4.2.4
What target are you building for?
- Target: mac (dmg)
I’m trying to enable notarization in my app to support OSX 10.14.5, but even after following the many related issues submitted by others, the process still doesn’t work correctly for me: the notarization process completes successfully (which is even confirmed by spctl -a -v Test.app
and codesign --verify -vv Test.app
) but when I run the app on a newer mac with OSX 10.14.5 the app crashes with the following error:
Exception Type: EXC_BAD_ACCESS (Code Signature Invalid) Exception Codes: 0x0000000000000032, 0x00000ae52f684040 Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x2 […] Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 ??? 0x00000ae52f684040 0 + 11979459149888 1 com.github.Electron.framework 0x0000000106ff8a01 0x105c32000 + 20736513
Note that the app runs fine on older OSX versions that do not have the notarization requirement.
What I tried: I followed this guide by @Kilian in the issue #3870 to add the necessary electron-notarize parts. I was already signing with a “Developer ID” key, so I just added entitlements, gatekeeperAssesment and hardenedRuntime to package.json and the notarize script. I’m building on a Mac Mini with OSX 10.13.6 (according to Apple seems to be the minimum accepted version for notarization support) with yarn 1.16
I even removed all the code from my app, leaving only console.log('Hello World!'); process.exit(0)
but the app still crashes with the same error message.
I tried adding every entitlment allowed, but still no progress
I hope some of you can guide me to the correct direction.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:40 (8 by maintainers)
Top GitHub Comments
Many, many people are also having the same issue and it is unresolved…
I believe it is still an issue