autoupdater.quitAndInstall don't relaunch and update success
See original GitHub issue- electron-builder: 20.28.4
- electron-updater: 3.1.2
- Target: Mac
click Restart now
can relaunch because of app.relaunch();app.exit()
, but cant update from the downloaded update file. Then will launch app and show dialog again and so on, repeated cycle.
@develar @maczikasz, thx.
index = dialog.showMessageBox({
type: 'info',
buttons: ['Restart now', 'later'],
title: 'Updates downloaded',
message: Message.downloaded + meta.version,
detail: meta.readme,
});
if (index === 0) {
try {
autoUpdater.quitAndInstall();
setTimeout(() => {
app.relaunch();
app.exit(0);
}, 6000);
} catch (e) {
dialog.showErrorBox('Error', 'Failed to install updates');
}
}
} else {
delFile(pkgCacheDir);
dialog.showMessageBox({
type: 'warning',
buttons: ['OK'],
title: 'Updates downloaded fail',
message: global.localizedStrings.pkgSignFailMessage,
detail: global.localizedStrings.pkgSignFailDetail,
});
}
Error:
[2018-10-19 00:02:55:0774] [error] Error: Error: No update available, can't quit and install
at MacUpdater.quitAndInstall (/Users/cuitfanshide/Documents/Projects/7-dragon-ball-wallet-2c/dist/mac/WOOKONG Solo.app/Contents/Resources/app/node_modules/electron-updater/src/MacUpdater.ts:149:24)
at /Users/cuitfanshide/Documents/Projects/7-dragon-ball-wallet-2c/dist/mac/WOOKONG Solo.app/Contents/Resources/app/dist/main.js:910:43
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:109:7)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:26 (2 by maintainers)
Top Results From Across the Web
Electron auto update fails silently when installing update on ...
When I publish a new version, the auto-updater detects it, downloads it successfully, and then tries to install it. During installation of the ......
Read more >app | Electron
Note: If application quit was initiated by autoUpdater.quitAndInstall() , then before-quit is emitted after emitting close event on all windows and closing ...
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 >Electron Auto-Updater via Renderer (Frontend) Manipulation
send(DOWNLOAD_UPDATE_PENDING); // Update your updateCheckLevel to DOWNLOAD in your state. } else { // No updates found. Trigger success in your ...
Read more >4. Binaries, Installers, and Updates - Introducing Electron [Book]
However, once you ship your application to users, the name Electron should never show up in any Windows task manager or macOS activity...
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
Why was this issue closed? Any fixes found?
still doesn’t work in electron-updater@4.3.5 on macos 10.15.7
The exit and update were successful, but there was no restart