question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:8

github_iconTop GitHub Comments

2reactions
almamlakacommented, Jan 30, 2020

hi same thing for me @amargautam I think what @cegonzalv problem and my is different from you, it does not detect any download

isn’t capable of finishing downloading or it never enters the ‘update-downloaded’ event

@cegonzalv from which version it was working before for you ?

I use the last release 22.3.2 with nsis target

1reaction
amargautamcommented, Jan 26, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto Update - electron-builder
Because some of your users will be on the broken 1.0.1, releasing a new 1.0.1 would result in them staying on a broken...
Read more >
20.44.4 - electron-builder - npm
A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out ......
Read more >
electron-publish: Versions | Openbase
Full version history for electron-publish including change logs.
Read more >
Electron-builder NPM
A complete solution to package and build a ready for distribution Electron app for macOS, Windows and Linux with “auto update” support out...
Read more >
electron auto updater without code signing - You.com | The AI ...
Version : 21.2.0. Target: Mac DMG. When running electron-builder to build and sign my application, everything works and I receive no errors.
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