electron-builder: Error on windows updates - spawn setup.exe EACCES

  • Version: builder v20.38.5 and updater v4.0.6

  • Target: --win --x64 --ia32

See the following test application as an example: https://github.com/kspearrin/electron-updater-issue

Hi @develar , I have donated in hopes of raising the priority on this issue. It is creating a bit of a large problem with our app that we are trying to release updates to.

Our apps current production version uses Electron v3.0.13, electron-builder v20.31.2, and electron-updater v3.0.3. Whenever we published an update of our app, all users now get the following error whenever the update-downloaded event runs:

autoUpdater.on('update-downloaded', (info) => {
   autoUpdater.quitAndInstall(false, true);
});
Uncaught Exception:
Error: spawn C:\Users\me\AppData\Roaming\electron-updater-example\__update__\electron-updater-example-web-setup-2.0.1.exe EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
    at onErrorNT (internal/child_process.js:406:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

capture

This problem seems to only occur on Windows. It didn’t error on macOS, but I have yet to test Linux.

I guess it is a permissions issue. Running the application in administrator mode solves the problem, but this is not a good solutions for thousands of users of the application currently.

This looks like a similar issue: https://github.com/electron-userland/electron-builder/issues/3480

We’ve also tried publishing an update which upgrades electron-builder to the latest v20.38.5 and electron-updated to v4.0.6, but the same problem still occurs. I believe the broken version is currently in production, so I am not sure how repair this problem for the thousands of users currently using the broken version.

Reproduction steps

Using the sample app at: https://github.com/kspearrin/electron-updater-issue/releases

  1. Download and install version v2.0.0. This version uses builder v20.31.2, and updater v3.0.3
  2. Run the application. It will try to update to v3.0.1. This version uses builder v20.38.5 and updater v4.0.6.
  3. Observe the error.

You can see that this problem was resolved in the latest builder/updater versions by first installing v3.0.0 and seeing it successfully update to v3.0.1. Both of these use the latest builder v20.38.5 and updater v4.0.6.


How do we repair this problem for our existing users on the broken version so that they can automatically update without having to run the application in administrator mode? This would create a support nightmare if users have to manually work around this error.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 19 (3 by maintainers)

Most upvoted comments

@develar We are having the exact same issue. Would appreciate the response. Thanks 😃

Anybody solved this? All my app users are stuck in an infinite loop of autoupdate!

Having:

Cannot run installer: error code: EACCES, error message: "spawn C:\Users\damians\AppData\Local\<myapp>\pending\<myapp>.exe EACCES", will be executed again using elevate if EACCES"

My deps:

    "dependencies": {
        "auto-launch": "^5.0.5",
        "better-console": "^1.0.1",
        "electron-log": "3.0.9",
        "electron-updater": "^4.2.0",
        "lodash": "^4.17.15",
        "luxon": "^1.21.3",
        "mz": "^2.7.0",
        "node-machine-id": "^1.1.12",
        "sleep-promise": "^8.0.1",
        "typeface-arimo": "^0.0.72",
        "ws": "^7.2.0"
    },
    "devDependencies": {
        "electron": "^7.1.3",
        "electron-builder": "21.2.0",
        "electron-debug": "3.0.1",
        "electron-notarize": "^0.2.1",
        "eslint": "^6.7.2",
        "png2icns": "^0.0.1"
    }