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.

autoUpdater event update-downloaded called with null

See original GitHub issue
  • Version: 22.9.1
  • Electron Version: 11.2.2
  • electron-updater Version: 4.3.5
  • Target: macOS (darwin 19.6.0),

On macOS I’ve couple times noticed that autoUpdater event update-downloaded hander was called with null. If it’s valid then it’s not documented.

code looks like this:

import { autoUpdater, UpdateInfo } from "electron-updater";
....
autoUpdater.on("update-downloaded", (updateInfo: UpdateInfo) => {
  console.log(updateInfo.version)
})

and the error like this:

TypeError: Cannot read property 'version' of null
    at c.<anonymous> (/Applications/MySuperApp.app/Contents/Resources/app.asar/app/main/dist/ui.prod.js:1:10635)
    at c.emit (events.js:315:20)
    at c.EventEmitter.emit (domain.js:483:12)
    at c.dispatchUpdateDownloaded (/Applications/MySuperApp.app/Contents/Resources/app.asar/app/main/dist/ui.prod.js:17:125992)
    at AutoUpdater.<anonymous> (/Applications/MySuperApp.app/Contents/Resources/app.asar/app/main/dist/ui.prod.js:17:137359)
    at AutoUpdater.emit (events.js:315:20)
    at AutoUpdater.EventEmitter.emit (domain.js:483:12)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
ramaralocommented, Jul 22, 2021

@mmaietta Thanks for taking a look at this.

From the PR I would assume the issue would be constant and reproducible and it seams to be random… I do see it was published at v22.11.8 and we are art v22.11.7.

I’ll try to update and see if it still happens.

0reactions
stale[bot]commented, Sep 21, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron Updater Not Calling 'update-downloaded' event after ...
we have following code snippet where we calling autoUpdater.quitAndInstall(), but its not quitting current version of app and not installing ...
Read more >
Auto Update - electron-builder
It should only be called after update-downloaded has been emitted. Note: autoUpdater.quitAndInstall() will close all application windows first and only emit ...
Read more >
How to use the electron-updater.autoUpdater.allowPrerelease ...
To help you get started, we've selected a few electron-updater examples, based on popular ways it is used in public projects. Secure your...
Read more >
electron-updater@5.3.0 - jsDocs.io
It should only be called after update-downloaded has been emitted. **Note:** autoUpdater.quitAndInstall() will close all application windows ...
Read more >
How to update your Electron application with Update Rocks!
autoUpdater.on( 'update-downloaded', (event, releaseNotes, releaseName) => { console.log('Update downloaded') dialog.showMessageBox({
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