EPERM error on windows during update process
See original GitHub issue- Version: electron-builder v20.38.5 electron-updater v4.0.6 https://github.com/signalapp/Signal-Desktop/blob/development/package.json#L116
- Target: macOS
We’ve had quite a few of our users run into this, a new issue appearing with a recent upgrade of Electron Builder/Updater. Maybe the file isn’t fully downloaded and closed before we try to do something with it?
It seems to happen before the prompt is shown asking the user to update - you can see our update code here:
- Checking for new version: https://github.com/signalapp/Signal-Desktop/blob/84bb9be6a9c8bcd520301cc0220f4b7109cb0923/app/auto_update.js#L21-L27
- Listening for ‘update-downloaded’ event: https://github.com/signalapp/Signal-Desktop/blob/84bb9be6a9c8bcd520301cc0220f4b7109cb0923/app/auto_update.js#L77-L79
- Kicking off the upgrade with the downloaded file: https://github.com/signalapp/Signal-Desktop/blob/84bb9be6a9c8bcd520301cc0220f4b7109cb0923/app/auto_update.js#L49-L58
The callstack looks like this:
Unhandled Promise Rejection
Error: EPERM: operation not permitted, open 'C:\Users\XXX\AppData\Local\signal-desktop-beta-updater\pending\temp-signal-desktop-beta-win-1.21.0-beta.4.exe'
at ElectronHttpExecutor.download (C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\electronHttpExecutor.ts:23:73)
at Object.<anonymous> (C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:35:35)
From previous event:
at Object.task (C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:31:11)
at C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:610:25
From previous event:
at NsisUpdater.executeDownload (C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:545:68)
at NsisUpdater.executeDownload (C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\BaseUpdater.ts:27:18)
at NsisUpdater.doDownloadUpdate (C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:27:17)
at NsisUpdater.downloadUpdate (C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:420:19)
at C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:383:49
at Generator.next (<anonymous>)
at runCallback (timers.js:696:18)
at tryOnImmediate (timers.js:667:5)
at processImmediate (timers.js:649:5)
From previous event:
at NsisUpdater.doCheckForUpdates (C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:360:34)
at NsisUpdater.checkForUpdates (C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:220:35)
at Timeout.checkForUpdates [as _onTimeout] (C:\Users\XXX\AppData\Local\Programs\signal-desktop-beta\resources\app.asar\app\auto_update.js:22:15)
at ontimeout (timers.js:427:11)
at tryOnTimeout (timers.js:289:5)
at listOnTimeout (timers.js:252:5)
at Timer.processTimers (timers.js:212:10)
Original bug: https://github.com/signalapp/Signal-Desktop/issues/3106
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:6
Top Results From Across the Web
npm - EPERM: operation not permitted on Windows
Today I got EPERM even in cmd.exe . But I ran the following command standing in C:\Program Files\nodejs , and it seems to...
Read more >How to fix npm ERR! Error: EPERM: operation not ... - YouTube
How to fix npm ERR! Error : EPERM : operation not permitted, rename Solucionar el error npm ERR! ... en windows usando Windows...
Read more >sfdx update fails, Error: EPERM: operation not permitted
I was facing the same error right now. I added the location to environment variables and its working fine now.
Read more >Npm failed with return code: 4294963248, Error: EPERM
I had this error while updating jquery 3.3.1 -> 3.5.1. First, here is what I tried: I tried npm cache clean --force, nada....
Read more >Error: EPERM: operation not permit… | Apple Developer Forums
I am installing packages for NODEJS/NPM and am receiving the following error, which, apparently, is not an error with the software, but with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I still have this issue, when I cancelled my current update, and re-update again, I got “[2021-02-19 10:39:17.858] [warn] auto updater error – real Error: EPERM: operation not permitted,” does anyone have a solution?
Update: during 2 days, i found the solution. thanks to @StaZhu, I forked the repo and use his changes. It works!
It seems like electron-builder team has no longer maintain the framework anymore