electron-builder: UnhandledPromiseRejectionWarning: Error: spawn UNKNOWN

  • Electron-Builder Version: 22.14.5
  • Node Version: 16.9.1
  • Electron Version: 16.0.4
  • Electron Type (current, beta, nightly): current
  • Target: win > nsis

Tried to search for this error but couldn’t find any open issue. Some users are still running an old version of our app because the updater fails to verify the signature. Checking into Sentry I found the following error:

download range: bytes=121616364-121769447
Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:412:11)
    at spawn (node:child_process:707:9)
    at Object.execFile (node:child_process:334:17)
    at Object.t.<computed> [as execFile] (node:electron/js2c/asar_bundle:5:2196)
    at C:\Users\user\AppData\Local\Programs\...\resources\app.asar\node_modules\electron-updater\out\windowsExecutableCodeSignatureVerifier.js:34:25
    at new Promise (<anonymous>)
    at Object.verifySignature (C:\Users\user\AppData\Local\Programs\...\resources\app.asar\node_modules\electron-updater\out\windowsExecutableCodeSignatureVerifier.js:11:12)
    at NsisUpdater.verifySignature (C:\Users\user\AppData\Local\Programs\...\resources\app.asar\node_modules\electron-updater\out\NsisUpdater.js:82:63)
    at async Object.task (C:\Users\user\AppData\Local\Programs\...\resources\app.asar\node_modules\electron-updater\out\NsisUpdater.js:35:53)
    at async NsisUpdater.executeDownload (C:\Users\user\AppData\Local\Programs\...\resources\app.asar\node_modules\electron-updater\out\AppUpdater.js:516:13)

Please let me know if there is anything missing to investigate this further. Thanks!

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 7
  • Comments: 15

Most upvoted comments

we find root cause is: Disable PowerShell in Windows 10 using Local Security Policy