electron-builder: Electron Updater Doesn't Fire events When Using CDN On Windows

  • 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 😃

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

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.