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.

electron-updater raising EACCES in spawned process when executing "quitAndInstall"

See original GitHub issue
  • electron-builder version: 17.10.0
  • electron-updater version: 1.16.0
  • Target: Windows 7 64-bit

I’ve downloaded electron-updater-generic-example and have been using it to get familiar with electron-updater. I’ve followed the instructions as listed except for some changes to package.json:

{
  "name": "electron-updater-generic-example",
  "version": "0.2.4",
  "main": "main.js",
  "description": "electron-updater generic example project",
  "author": "Matt Haggard",
  "devDependencies": { // Updated dev dependencies to latest versions
    "electron": "^1.7.1",
    "electron-builder": "^17.10.0",
    "http-server": "^0.10.0"
  },
  "dependencies": { // Updated dependencies to latest versions
    "electron-log": "^2.2.6",
    "electron-updater": "^1.16.0"
  },
  "build": {
    "publish": [
      {
        "provider": "generic",
        "url": "http://127.0.0.1:36366/" // Changed port
      }
    ],
    "files": [ // Explicitly specified files
      "node_modules",
      "main.js",
      "package.json",
      "version.html"
    ],
    "appId": "com.github.iffy.electronupdatergenericexample",
    "mac": {
      "category": "your.app.category.type",
      "target": [
        "zip",
        "dmg"
      ]
    },
    "nsis": {
      "perMachine": true
    },
    "directories": {
      "output": "wwwroot" // Made releases directly output into wwwroot for simplicity
    }
  }
}

In an example run, I built v0.2.3 of this application and installed it manually without issue. Running it I got these logs:

[2017-05-24 09:40:18:0267] [info] App starting...
[2017-05-24 09:40:18:0519] [info] Checking for update
[2017-05-24 09:40:18:0520] [info] Checking for update...
[2017-05-24 09:40:19:0717] [info] Update for version 0.2.3 is not available (latest version: 0.2.3, downgrade is disallowed.

I then bumped the version to 0.2.4 and rebuilt the app, with the 0.2.4 setup installer appearing under wwwroot/.

After closing and relaunching the installed version (v0.2.3) of the app, I see these logs:

2017-05-24 09:42:01:0993] [info] App starting...
[2017-05-24 09:42:02:0265] [info] Checking for update
[2017-05-24 09:42:02:0266] [info] Checking for update...
[2017-05-24 09:42:03:0473] [info] Found version 0.2.4 (url: http://127.0.0.1:36366/electron-updater-generic-example Setup 0.2.4.exe)
[2017-05-24 09:42:03:0474] [info] Update available.
[2017-05-24 09:42:03:0474] [info] Downloading update from http://127.0.0.1:36366/electron-updater-generic-example Setup 0.2.4.exe
[2017-05-24 09:42:04:0247] [info] Download progress...
[2017-05-24 09:42:04:0249] [info] New version 0.2.4 has been downloaded to C:\Users\<me>\AppData\Local\Temp\up-GeIIBQ\electron-updater-generic-example Setup 0.2.4.exe
[2017-05-24 09:42:04:0249] [info] Update downloaded; will install in 5 seconds
[2017-05-24 09:42:13:0894] [error] Error: Error: spawn EACCES
    at exports._errnoException (util.js:1050:11)
    at ChildProcess.spawn (internal/child_process.js:319:11)
    at exports.spawn (child_process.js:390:9)
    at NsisUpdater.install (C:\Program Files\electron-updater-generic-example\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:116:7)
    at NsisUpdater.quitAndInstall (C:\Program Files\electron-updater-generic-example\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:86:14)
    at Timeout._onTimeout (C:\Program Files\electron-updater-generic-example\resources\app.asar\main.js:122:17)
    at ontimeout (timers.js:386:14)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5)
[2017-05-24 09:42:13:0894] [info] Error in auto-updater.
[2017-05-24 09:42:13:0898] [info] Auto install update on quit

Nothing happens after the application closes. When I relaunch the application, it’s still on v0.2.3 and attempts to repeat the download and installation.

EACCES suggests a permission error, but I’m not sure why this would happen considering that there’s nothing special I’m trying to do.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
damianobarbaticommented, Nov 19, 2019

Happening to me now.

0reactions
TAGCcommented, Nov 15, 2018

No idea anymore I’m afraid, this issue is one and a half years old and I don’t remember anything about it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

electron auto-update for windows - Stack Overflow
I test this by running my app windows portable .exe file: electron-auto-updater-1.0.2 after I have already released v1.0.3, ...
Read more >
electron-builder | Yarn - Package Manager
A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out...
Read more >
Electron AutoUpdater自动更新问题 - 简书
electron-updater raising EACCES in spawned process when executing "quitAndInstall" #1580 · Updater not working with Windows 10/Electron 1.7.3 # ...
Read more >
All the Electron Docs! | Electron
Note: If application quit was initiated by autoUpdater.quitAndInstall() then before-quit is emitted after emitting close event on all windows and closing them.
Read more >
Auto Update - electron-builder
Staged rollouts allow you to distribute the latest version of your app to a subset of users that you can increase over time,...
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