Updater: NSIS quitAndInstall() - Application closes but does not restart (old bug resurfaced?)
See original GitHub issue- Operating system: Windows 7 Professional
- electron-builder version: 10.8.1
- Node version: 6.9.1
- Npm version: 3.10.8
- Build target: Only Windows (NSIS)
- Main package.json:
{
"name": "RacingPlus",
"description": "A racing mod for The Binding of Isaac: Afterbirth+.",
"scripts": {
"start": "electron ./app",
"postinstall": "install-app-deps",
"pack": "build --dir",
"dist": "build",
"dist2": "build --publish always"
},
"build": {
"appId": "org.electron.isaacRacingClient",
"win": {},
"publish": {
"provider": "github"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/Zamiell/isaac-racing-client.git"
},
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/Zamiell/isaac-racing-client/issues"
},
"homepage": "https://isaacracing.net",
"devDependencies": {
"electron": "^1.4.12",
"electron-builder": "^10.8.1"
}
}
- App package.json:
{
"name": "RacingPlus",
"productName": "Racing+",
"main": "./main.js",
"version": "0.0.22",
"description": "A racing mod for The Binding of Isaac: Afterbirth+.",
"author": "Racing+",
"license": "GPL-3.0",
"dependencies": {
"electron-auto-updater": "^0.5.3",
"electron-is-dev": "^0.1.2",
"electron-log": "^1.2.2",
"fs-extra": "^1.0.0",
"keytar": "^3.0.2",
"linkifyjs": "^2.1.3",
"tail": "^1.2.1",
"teeny-conf": "^1.0.1",
"touch": "^1.0.0",
"tracer": "^0.8.7"
}
}
- Console output of building it:
Building: isaac-racing-client v0.0.24
> RacingPlus@ dist2 D:\Repositories\isaac-racing-client
> build --publish always
Rebuilding native production dependencies for arch x64
Packaging for win32 x64 using electron 1.4.12 to dist\win-unpacked
Packaging NSIS installer for arch x64
Building NSIS installer
Creating Github Publisher - owner: Zamiell, project: isaac-racing-client, version: 0.0.24
Release with tag v0.0.24 doesn't exist, creating one
Uploading RacingPlus-Setup-0.0.24.exe [====================] 100% 0.0s
Released version 0.0.24 successfully.
Description of Problem
- As you can see from my
package.json
file, I am implementing NSIS automatic updates in my app using GitHub. - Testing on Windows 7 Professional, the application successfully updates, but it does not automatically reopen after closing.
Simplified code snippet to reproduce the problem:
const autoUpdater = require('electron-auto-updater').autoUpdater;
autoUpdater.on('update-downloaded', function(e, notes, name, date, url) {
autoUpdater.quitAndInstall();
});
autoUpdater.checkForUpdates();
I found some other issues on this, but they were closed as fixed in previous versions of electron-builder
, so maybe this bug is back now.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
NSIS AutoUpdater QuitAndInstall prompting user to close app ...
After an update is downloaded I call quitAndInstall. It works, but the installer opens before it is able to fully close the application....
Read more >Electron auto update fails silently when installing update on ...
The app remains closed and does not automatically relaunch after the progress bar disappears. When I re-launch it manually, it is still the...
Read more >electron auto updater without code signing - You.com | The AI ...
autoUpdater.quitAndInstall () Restarts the app and installs the update after it has been downloaded. It should only be called after update-downloaded has ......
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
Ah! Yes, this is a very silly issue - I did
ncu --upgradeAll
in the root on my repository, but I also needed to ALSO do it in theapp
subdirectory.Additionally,
ncu
doesn’t actually update the dependencies properly (maybe a Windows only issue?), so the only way I could get it to work was to completely nuke both of mynode_modules
directories and do anpm install
from scratch.I donated. Thanks for your support! Make this donation go towards delta NSIS updates and OSX NSIS updates.
In general, 1 package.json is easier to mantain. You just need to configure
files
properly to ignore dev only files. Currently, no strict recommendation.