question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EPERM error on windows during update process

See original GitHub issue
  • 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:

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:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:6

github_iconTop GitHub Comments

27reactions
stale[bot]commented, Jul 1, 2019

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.

0reactions
ShawnKuancommented, Feb 20, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found