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.

Electron Updater Doesn't Fire events When Using CDN On Windows

See original GitHub issue
  • Version: Electron Builder 20.0.8
  • Version: Electron Updater 2.20.1
  • Target: dmg, nsis

Electron updater just gets stuck on “Checking for Updates” No other events seem to fire. I don’t have any errors in the autoUpdater.log file.

Logfile:

info 2018-02-21 11:26:16 Checking for update

I’ve let it sit here for a good five minutes hoping for another event to be fired it doesn’t seem to fire.

Here is my package.json

Registering Update Events As The documentation example says

attachUpdaterHandlers: function () {

        autoUpdater.on('checking-for-update', () => {
         log.info('checking for updates')
        })

        autoUpdater.on('update-available', (info) => {
          log.info('Update available ' + info.version)
        })

        autoUpdater.on('update-not-available', (info) => {
          log.info('no updates available')
        })

        autoUpdater.on('download-progress', (progressObj) => {
          if (progressObj.bytesPerSecond > 1024 * 1024) {
            this.notification = 'Download speed: ' + this.roundTo(progressObj.bytesPerSecond / 1024 / 1024, 2) +
              '  Mb/s'
          }
          else {
            this.notification = 'Download speed: ' + this.roundTo(progressObj.bytesPerSecond / 1024, 2) + '  Kb/s'

          }
          this.progressObj = progressObj
        })

        autoUpdater.on('update-downloaded', () => {
          log.info('download complete')
          autoUpdater.quitAndInstall()
        })

        autoUpdater.on('error', (e) => {
             log.error(e)
        })
      },

Calling it like so:

        const autoUpdater = remote.require('electron-updater').autoUpdater, //this also is declared in the main.js file
        mainWindow  = remote.getCurrentWindow()

        autoUpdater.checkForUpdates().then(() => { }, error => { throw(error) })

Any feedback on this issue would be greatly appreciated 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
vhmthcommented, Aug 7, 2018

Yeah so have I at this point, but it would be nice to get updates from our cdn. Our users are all around the world, so the local caching + gzip and http/2 capabilities a cloud front property provide are really game changers for pushing out much faster updates.

0reactions
mahnunchikcommented, Feb 3, 2021

I got the same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron update-available and update-downloaded event not ...
when client call autoUpdater.checkForUpdates() i can see the server log display this: debug: Windows Update Search Query { platform: ...
Read more >
Updating Applications | Electron
When an update is found, it will automatically be downloaded in the background. When the download completes, a dialog is displayed allowing the...
Read more >
4. Binaries, Installers, and Updates - Introducing Electron [Book]
The four events emitted are checking-for-update , update-available , update-not-available , and finally update-downloaded .
Read more >
electron-builder-squirrel-windows | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
npm:electron-simple-updater | Skypack
Windows install/update command line arguments. It doesn't require a dedicated release server. You need only 2 lines of code to make it work....
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