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:
- Created 6 years ago
- Comments:14 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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.
I got the same issue