electron-builder: Error: No update available, can't quit and install

  • Version: “electron-builder”: “^20.28.2”

“electron-updater”: “^3.1.1”

  • Target: Mac

Recently I updated electron-builder from ^19.19.1 to the lastest version, ^19.19.1 worked very well but the lastest version failed. I see the log show follows: `

2018-08-22 17:10:01:838 info:Update has already been downloaded to /Users/mymac/Library/Application Support/MyApp/update/myapp-2.1.0.zip). 2018-08-22 17:10:01:848 warn:Error: No update available, can’t quit and install ` I saw the updates has been downloaded, but it can not be installed. Look forward to your favourable reply.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 29
  • Comments: 16 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Glad to see I’m not the only one having this same exact issue

Yep…issue with the 3.1.x package(s). 3.0.3 works great.

I got it working on electron-updater - 4.0.6 and electron-builder - 20.36.2. This is what i was doing before

autoUpdater.downloadUpdate().then(() => {
    autoUpdater.quitAndInstall(true, true);
}).catch(downloadError => {
    console.error(downloadError);
});

Because of some timing issue, i had to wait for update-downloaded to be fired and the call quitAndInstall and then i changed it to below code

autoUpdater.on('update-downloaded', (ev, info) => {
    autoUpdater.quitAndInstall(true, true);
});


autoUpdater.downloadUpdate().then(() => {
    console.log('wait for post download operation');
}).catch(downloadError => {
    console.error(downloadError);
});

Update: With electron-updater version 3.0.3 OSX updates work (May work with more recent releases as well, didn’t test)

As a workaround I’m setting autoUpdater.autoInstallOnAppQuit = true and asking the user to quit the app in a dialog… any updates on this?