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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:26 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
Juned-H2commented, Dec 18, 2021

Why was this issue closed? Any fixes found?

6reactions
lilong7676commented, Feb 4, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

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