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

Problem with dist.bat electron-build failing #1

Open
jackfrost2013 opened this issue Apr 28, 2020 · 2 comments
Open

Problem with dist.bat electron-build failing #1

jackfrost2013 opened this issue Apr 28, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@jackfrost2013
Copy link

jackfrost2013 commented Apr 28, 2020

When running the dist.bat in an admin cmd on windows 10 electron-build fails. Seems to be an issue with the certificate. Included relevant debug log.
2020-04-28T19_55_34_513Z-debug.log

WARNING in budgets: Exceeded maximum budget for initial-es2015. Budget 2 MB was not met by 372 kB with a total of 2.36 MB.

WARNING in budgets: Exceeded maximum budget for initial-es5. Budget 2 MB was not met by 537 kB with a total of 2.52 MB.

> [email protected] dist C:\Build\GCPEditorPro-master
> electron-builder

  • electron-builder  version=22.5.1 os=10.0.18363
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist\builder-effective-config.yaml
  • packaging       platform=win32 arch=x64 electron=8.2.4 appOutDir=dist\win-unpacked
  • empty password will be used for code signing  reason=CSC_KEY_PASSWORD is not defined
  ⨯ open d:\comodo.pfx: The device is not ready.
  ⨯ Cannot extract publisher name from code signing certificate. As workaround, set win.publisherName. Error: Error: C:\Build\GCPEditorPro-master\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
    at ChildProcess.<anonymous> (C:\Build\GCPEditorPro-master\node_modules\builder-util\src\util.ts:243:14)
    at Object.onceWrapper (events.js:417:26)
    at ChildProcess.emit (events.js:310:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)  stackTrace=
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Error: Cannot extract publisher name from code signing certificate. As workaround, set win.publisherName. Error: Error: C:\Build\GCPEditorPro-master\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           at ChildProcess.<anonymous> (C:\Build\GCPEditorPro-master\node_modules\builder-util\src\util.ts:243:14)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           at Object.onceWrapper (events.js:417:26)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           at ChildProcess.emit (events.js:310:20)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           at maybeClose (internal/child_process.js:1021:16)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        at getCertInfo (C:\Build\GCPEditorPro-master\node_modules\app-builder-lib\src\codeSign\windowsCodeSign.ts:85:11)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                at processTicksAndRejections (internal/process/task_queues.js:97:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dist: `electron-builder`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dist script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
@pierotofy pierotofy added the bug Something isn't working label May 1, 2020
@pierotofy
Copy link
Member

Thanks for the report @jackfrost2013, yes this seems a bug due to the path of the signing certificate. I suspect most users don't need to sign the executable, but I'm not sure how to specify a logic to "sign only if a certificate is available".

A workaround would be to remove the certificate reference from https://github.com/uav4geo/GCPEditorPro/blob/master/package.json#L29

@and-viceversa
Copy link

It looks like the same thing occurs on macOS Big Sur.

> [email protected] dist
> ./node_modules/.bin/electron-builder

  • electron-builder  version=22.10.5 os=20.3.0
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=darwin arch=x64 electron=8.5.5 appOutDir=dist/mac
  • Unpacking electron zip  zipPath=undefined
  • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing allIdentities=
                                                   0 identities found
                                              
                                                Valid identities only
                                                   0 valid identities found
  ⨯ No authentication properties provided (e.g. appleId, appleApiKey)  stackTrace=
                                                                         Error: No authentication properties provided (e.g. appleId, appleApiKey)
                                                                             at Object.validateAuthorizationArgs (/Users/labmac/programs/GCPEditorPro/node_modules/electron-notarize/src/validate-args.ts:51:9)
                                                                             at authorizationArgs (/Users/labmac/programs/GCPEditorPro/node_modules/electron-notarize/src/index.ts:43:16)
                                                                             at /Users/labmac/programs/GCPEditorPro/node_modules/electron-notarize/src/index.ts:78:10
                                                                             at Generator.next (<anonymous>)
                                                                             at fulfilled (/Users/labmac/programs/GCPEditorPro/node_modules/electron-notarize/lib/index.js:4:58)
                                                                             at processTicksAndRejections (node:internal/process/task_queues:94:5)

Is there a similar workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants