Vendored version of electron-osx-builder is old and causes notarization to fail
See original GitHub issue- Version: 22.8.0
- Electron Version: 6.1.5
- Electron Type (current, beta, nightly): current
- electron-updater: 4.1.2
- Target: MacOS
This issue has been mentioned in #4934 and #4656, but the gist is that electron-builder isn’t signing certain binary files, which causes notarization to fail with errors like those below. This issue was fixed in electron/electron-osx-sign#169, but electron-builder vendors a copy of electron-osx-sign here. Updating the vendored version of electron-osx-sign promises to resolve this issue.
"issues": [
{
"severity": "error",
"code": null,
"path": "MyApp.zip/MyApp.app/Contents/chrome-chromedriver/mac/node_modules/puppeteer/.local-chromium/chrome/Chromium.app/Contents/MacOS/Chromium",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MyApp.zip/MyApp.app/Contents/chrome-chromedriver/mac/node_modules/puppeteer/.local-chromium/chrome/Chromium.app/Contents/MacOS/Chromium",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MyApp.zip/MyApp.app/Contents/chrome-chromedriver/mac/node_modules/puppeteer/.local-chromium/chrome/Chromium.app/Contents/MacOS/Chromium",
"message": "The executable does not have the hardened runtime enabled.",
"docUrl": null,
"architecture": "x86_64"
},
...
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Electron App Notarized but not opening. [electron-builder ...
I tried a bunch of things to fix this, but I think that the following are the answer: #1 Add a value to...
Read more >Common Configuration - electron-builder
forceCodeSigning = false Boolean - Whether to fail if the application is not signed (to prevent unsigned app if code signing configuration is...
Read more >Changelog - Cypress Documentation
Fixed an issue where the Cypress migration wizard would fail to run in global mode on newer versions of Cypress. Addressed in #25138....
Read more >Changelog | Finsemble
Links to previous versions of the documentation (3.7 and later) can be found under each ... The electron-packager has been upgraded to 17.0.0...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Dare I ask, why vendor electron-osx-sign at all?
Thankfully, I was able to develop a workaround for the issue:
electron-osx-sign
as a dev dependency:yarn add --dev electron-osx-sign
electron-osx-sign
and invokessignAsync
: https://github.com/electron/electron-osx-sign#from-the-api. This technically means that you’ll be signing everything twice (once with the broken version of electron-osx-sign that is bundled with electron-builder and once with the newer version you installed previously), but it did work for my case.Here’s what my afterSign.js script looks like:
Popular guides for notarizing electron applications instruct you to create an
afterSign.js
file anyways, so this workaround isn’t a terrible inconvenience.