Auto-update breaks when going from electron-builder version 20.44.4 to latest version (21.2.0)
See original GitHub issue- Version: 20.44.4
- Electron-updater Version: 4.2.0
- Target: Win32 and Win64
For some months now I’ve tried updating the electron-builder version from 20.44.4 to the latest version, 21.2.0. Everything seems to be fine but when the app is going to be updated via the auto-update feature, it presents an unexpected behavior:
When updating to the latest stable version (21.2.0) it seems to never enter the update-downloaded event. The last log present is “Full: 51,655.77 KB, To download: 51,584.6 KB (100%)”. It stays there and it never does the quit and install part of the process.
My logic on the update-downloaded event is as follows:
autoUpdater.on('update-downloaded', async (updateInfo) => {
log.info("UPDATE DOWNLOADED... INSTALLING")
setImmediate(() => {
autoUpdater.quitAndInstall();
app.exit()
})
})
This logic has worked all the time when updating my app with electron-builder version 20.44.4, but it breaks whenever the current version is 20.44.4 and the new version to download has any 21.x.x electron-builder version as a dependency. (I also tried on the latest 22.2.0 version without any luck, same behavior as before). I would like to be able to update electron-builder to the latest version without compromising the auto-update feature and be able to automatically update electron-builder on the hundreds of devices that are already running our app on 20.44.4 electron-builder version.
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8
Top GitHub Comments
hi same thing for me @amargautam I think what @cegonzalv problem and my is different from you, it does not detect any download
@cegonzalv from which version it was working before for you ?
I use the last release 22.3.2 with nsis target
This happened to me too!
@cegonzalv is correct that it detects the download, it downloads, send a notification that download is complete but then when you restart the app, it is still on older version and the notification keeps coming up.
Luckily I am only on the alpha of my v2 for my app. So I didn’t care much. I simply upgraded to the latest version for next alpha and manually updated it. I will be too cautious in production while upgrading electron-builder and updater.