electron-builder
electron-builder copied to clipboard
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!
I've got the same issue running with :
OS : Windows 10 pro electron-builder: 22.14.5 electron: 16.0.6
Client doesn't succeed to upgrade to lastest version and has the same error :
Error: spawn UNKNOWN at ChildProcess.spawn (node:internal/child_process:412:11) at spawn (node:child_process:707:9) at execFile (node:child_process:334:17) at t.
(node:electron/js2c/asar_bundle:5:2196) at new Promise ( ) at t.verifySignature at m.verifySignature at processTicksAndRejections (node:internal/process/task_queues:96:5) at Object.task at m.executeDownload Error: spawn UNKNOWN
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.
The same issue on Windows 11
electron-builder: 22.14.5,
electron-updater: 4.6.1,
electron: 15.3.3
The issue happend while doing 'Differential download'
Some of our users also seem to be having this issue, here's a more detailed stacktrace;
UnhandledRejection Error: spawn UNKNOWN
File "node:internal/child_process", line 412, col 11, in ChildProcess.spawn
File "node:child_process", line 707, col 9, in spawn
File "node:child_process", line 334, col 17, in Object.execFile
File "node:electron/js2c/asar_bundle", line 5, col 2208, in Object.t.<computed> [as execFile]
File "app:///node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js", line 33, col 25, in <anonymous>
File "node:internal/child_process", in new Promise
File "app:///node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js", line 11, col 12, in Object.verifySignature
File "app:///node_modules/electron-updater/out/NsisUpdater.js", line 88, col 63, in NsisUpdater.verifySignature
File "node:internal/process/task_queues", line 96, col 5, in processTicksAndRejections
File "app:///node_modules/electron-updater/out/NsisUpdater.js", line 41, col 53, in Object.task
So it seems that this execFile method returns spawn UNKNOWN
. Unfortunately can't reproduce this yet.
Same issue has been coming up
same issue with my application, do you have any solution?
Same issue on my side, Does anyone have solution?
same issue on my side
has Any progress?
we find root cause is: Disable PowerShell in Windows 10 using Local Security Policy
How can disabling PS help to resolve this issue?
How can disabling PS help to resolve this issue?
I mean when user 'Disable PowerShell in Windows 10 using Local Security Policy' will throw this error
https://www.itechtics.com/disable-powershell/
I also see this sort of logging in our Sentry environment. Is it something we should just ignore?
If you don't want to use powershell for signature verification (or PS is just disabled), there's a new hook in v24 that allows for alternative methods to be leveraged/injected https://www.electron.build/configuration/win#how-do-use-a-custom-verify-function-to-enable-nsis-signature-verification-alternatives-instead-of-powershell The example leverages native module https://github.com/beyondkmp/win-verify-signature