electron-builder
electron-builder copied to clipboard
Auto update failed while executing the powershell command
- Electron-Builder Version: 22.2.0
- Node Version: 14.16.0
- Electron Version: 17.4.9
- Electron Type (current, beta, nightly): current
- Electron Updater: 5.2.1
- Target: nsis
Using Electron updater and git hub provider for auto update. After the update downloaded from github, A JavaScript error message displayed.
[Window Title] Error
[Main Instruction] A JavaScript error occurred in the main process
[Content] Uncaught Exception: Error: Command failed: powershell.exe -NoProfile -NonInteractive -InputFormat None -Command Get-AuthenticodeSignature -LiteralPath 'C:\Users\Administrator\AppData\Local\testApp-updater\pending\temp-update.exe' | ConvertTo-Json -Compress | ForEach-Object { [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($_)) }
at ChildProcess.exithandler (node:child_process:406:12) at ChildProcess.emit (node:events:390:28) at maybeClose (node:internal/child_process:1064:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
[OK]
This is occurring only in Windows thin clients. I couldn't able to reproduce in my windows laptop. I tried few other Windows laptops to test, but I couldn't able to reproduce it other than thin clients.
I tried to manually run this command to see, if there is any issue. but the command is executed fine without any error.
We've had 16k reports of this error in Evernote's updater.
Error: Command failed: powershell.exe -NoProfile -NonInteractive -InputFormat None -Command Get-AuthenticodeSignature -LiteralPath '***********AppData\Local\evernote-client-updater\pending\temp-Evernote-10.43.7-win-ddl-ga-3598-a51c0cce94-setup.exe' | ... File "node:child_process", line 406, in ChildProcess.exithandler File "node:events", line 390, in ChildProcess.emit File "node:domain", line 475, in ChildProcess.emit File "node:internal/child_process", line 1064, in maybeClose File "node:internal/child_process", line 301, in Process.ChildProcess._handle.onexit
Our error logs are also filled with this error:
Unhandled Error
Error: Command failed: powershell.exe -NoProfile -NonInteractive -InputFormat None -Command Get-AuthenticodeSignature -LiteralPath 'C:/Users/User/AppData/Local/appname-updater/pending/temp-AppName-Setup-1.0.99.exe' | ConvertTo-Json -Compress | ForEach-Object { [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($_)) }
at ChildProcess.exithandler (node:child_process:407:12)
at ChildProcess.emit (node:events:527:28)
at maybeClose (node:internal/child_process:1092:16)
at Socket.
Any clues how to fix or silence this error? It seems to occur only the first time the app is started according to one user report we got.