Skip to content
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

Failed to codesigh on electron 9.0.0-beta.24 MacOs Mojave 10.14.6 #4969

Closed
Sergey-Churilin opened this issue May 14, 2020 · 7 comments
Closed
Labels

Comments

@Sergey-Churilin
Copy link
Contributor

  • Version: 22.6.0

  • Electron Version: 9.0.0-beta.24

  • Electron Type (current, beta, nightly): beta

  • Target: mac

  • Operating System: macOS Mojave 10.14.6

  • Last Known Working Electron version: 7.1.11, 9.0.0-beta.22

  • Expected Behavior
    Application builds without issues

  • Actual Behavior
    Errors in console and build fails

Additional Information

Console build error:
signing file=dist/mac/App.app identityName=Apple Development: user@gmail.com (111111) identityHash=222222 provisioningProfile=none
Command failed: codesign --sign 22222222 --force --timestamp --options runtime --entitlements /Users/user//entitlements.mac.inherit.plist /Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
/Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: code object is not signed at all
In subcomponent: /Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Helpers/chrome_crashpad_handler
stackTrace= Error: Command failed: codesign --sign 2222222 --force --timestamp --options runtime --entitlements /Users/user//entitlements.mac.inherit.plist /Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
/Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: code object is not signed at all
In subcomponent: /Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Helpers/chrome_crashpad_handler
at ChildProcess.exithandler (child_process.js:289:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
From previous event:
at runCallback (timers.js:693:18)
at tryOnImmediate (timers.js:664:5)
at processImmediate (timers.js:646:5)
From previous event:
at MacPackager.signApp (/Users/user//node_modules/app-builder-lib/src/macPackager.ts:329:27)
at MacPackager.doPack (/Users/user//node_modules/app-builder-lib/src/platformPackager.ts:244:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1

@mikkame
Copy link

mikkame commented May 15, 2020

I had same error

@nali
Copy link

nali commented May 15, 2020

Experiencing this as well when trying to codesign a macOS app: in this erroring case, it looks like the tree traversal in the forked version of electron-osx-sign that electron-builder uses isn't signing the deepest nodes first, resulting in the issue of codesign complaining about unsigned inner contents.

With debug output enabled:

electron-osx-sign Walking... dist/mac/MYAPP.app/Contents +2ms
  electron-osx-sign Signing... dist/mac/MYAPP.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework +13ms
  electron-osx-sign Executing... codesign --sign 222 --force --timestamp --options runtime --entitlements build/entitlements.mac.plist dist/mac/MYAPP.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework +1ms
  electron-osx-sign Error executing file:
 > Stdout:
 > Stderr: dist/mac/MYAPP.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: code object is not signed at all
In subcomponent: dist/mac/MYAPP.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Helpers/chrome_crashpad_handler
 +178ms

Using the current version of electron-osx-sign on the same macOS app works fine though: the innermost contents are signed first:

electron-osx-sign Walking... dist/mac/MYAPP.app/Contents +2ms
  electron-osx-sign Signing... dist/mac/MYAPP.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak +25ms
  electron-osx-sign Executing... codesign --sign 222 --force --timestamp dist/mac/MYAPP.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak +0ms
  electron-osx-sign Signing... dist/mac/MYAPP.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/locale.pak +411ms
  electron-osx-sign Executing... codesign --sign 222 --force --timestamp dist/mac/MYAPP.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/locale.pak +0ms
...

@x4080
Copy link

x4080 commented May 22, 2020

Hi @nali, how do you fix it in the project that uses electron builder ? I tried to just install electron-osx-sign and it still shows error code sign (electron 9.1)

Thanks

@alchaplinsky
Copy link
Contributor

Same issue here

@dariocravero
Copy link

until #4993 or a similar solution gets merged, monkey patching node_modules/app-builder-lib/electron-osx-sign/sign.js with the code on that PR works

@x4080
Copy link

x4080 commented May 25, 2020

cool, wait for things to get merged

@develar develar closed this as completed May 27, 2020
@develar develar added the bug label May 27, 2020
@mitjans
Copy link

mitjans commented Nov 2, 2020

Any update on this?
Monkey patching the file sign.js at node_modules works, but shouldn't this be merged into master by now?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants