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:
- Created 6 years ago
- Comments:6
Happening to me now.
No idea anymore I’m afraid, this issue is one and a half years old and I don’t remember anything about it.