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

Pass --deep param with codesign #5002

Closed
KishanBagaria opened this issue May 22, 2020 · 4 comments
Closed

Pass --deep param with codesign #5002

KishanBagaria opened this issue May 22, 2020 · 4 comments
Labels

Comments

@KishanBagaria
Copy link
Contributor

  • Version: 22.6.1

  • Electron Version: 9.0.0

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

  • Target: macOS

When I run electron-builder build -m -c.extraMetadata.main build/mainbundle.js, the following error is thrown:

  • electron-builder  version=22.6.1 os=19.4.0
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=packaged/builder-effective-config.yaml
  • skipped dependencies rebuild  reason=npmRebuild is set to false
  • packaging       platform=darwin arch=x64 electron=9.0.0 appOutDir=packaged/mac
  • asar usage is disabled — this is strongly not recommended  solution=enable asar and use asarUnpack to unpack files that must be externally available
    • signing         file=packaged/mac/foo.app identityName=Apple Development: redacted@gmail.com (redacted) identityHash=redacted provisioningProfile=none
  ⨯ Command failed: codesign --sign redacted --force --timestamp --options runtime --entitlements /Users/kishan/foo/node_modules/app-builder-lib/templates/entitlements.mac.plist /Users/kishan/foo/packaged/mac/foo.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
/Users/kishan/foo/packaged/mac/foo.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: code object is not signed at all
In subcomponent: /Users/kishan/foo/packaged/mac/foo.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Helpers/chrome_crashpad_handler
  stackTrace=
 Error: Command failed: codesign --sign redacted --force --timestamp --options runtime --entitlements /Users/kishan/foo/node_modules/app-builder-lib/templates/entitlements.mac.plist /Users/kishan/foo/packaged/mac/foo.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
 /Users/kishan/foo/packaged/mac/foo.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: code object is not signed at all
 In subcomponent: /Users/kishan/foo/packaged/mac/foo.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Helpers/chrome_crashpad_handler

   at ChildProcess.exithandler (child_process.js:303:12)
   at ChildProcess.emit (events.js:315:20)
   at maybeClose (internal/child_process.js:1051:16)
   at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
                           From previous event:
   at processImmediate (internal/timers.js:456:21)
                           From previous event:
   at MacPackager.signApp (/Users/kishan/foo/node_modules/app-builder-lib/src/macPackager.ts:329:27)
   at MacPackager.doPack (/Users/kishan/foo/node_modules/app-builder-lib/src/platformPackager.ts:244:16)
   at MacPackager.pack (/Users/kishan/foo/node_modules/app-builder-lib/src/macPackager.ts:130:7)
   at Packager.doBuild (/Users/kishan/foo/node_modules/app-builder-lib/src/packager.ts:444:9)
   at executeFinally (/Users/kishan/foo/node_modules/builder-util/src/promise.ts:12:14)
   at Packager._build (/Users/kishan/foo/node_modules/app-builder-lib/src/packager.ts:373:31)
   at Packager.build (/Users/kishan/foo/node_modules/app-builder-lib/src/packager.ts:337:12)
   at executeFinally (/Users/kishan/foo/node_modules/builder-util/src/promise.ts:12:14)

The issue is resolved if I manually patch node_modules/app-builder-lib/electron-osx-sign/sign.js and add --deep in this array:

const args = [
'--sign', opts.identity.hash || opts.identity.name,
'--force'
]

This should either be there by default or we should be allowed to pass arbitrary CLI args to codesign.

@lutzroeder
Copy link
Contributor

Duplicate of #4969

@stale
Copy link

stale bot commented Jul 22, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Jul 22, 2020
@KishanBagaria
Copy link
Contributor Author

I'm still monkey patching node_modules/app-builder-lib/electron-osx-sign/sign.js. I can send a PR including --deep by default.

@stale stale bot removed the backlog label Jul 22, 2020
@stale
Copy link

stale bot commented Sep 20, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Sep 20, 2020
@stale stale bot closed this as completed Sep 27, 2020
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

2 participants