Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(electron-updater): null object error when MacUpdater logs server port before it is listening #6149

Merged

Conversation

@paulrosania
Copy link
Contributor

@paulrosania paulrosania commented Aug 12, 2021

This PR addresses an issue where macOS updates fail due to a null object reference.

Node's HTTP server address() method returns null until the server is listening for connections. electron-updater 4.4.4 and 4.4.5 contain a bug where MacUpdater attempts to log the server port before it is listening, which causes an error.

To fix this while maintaining the completeness of the added logs, I removed the server address from the existing log event but otherwise kept it in place. When the server is listening, a new event is recorded that includes the server address.

Node's HTTP server `address()` method returns `null` until the server is
listening for connections. This commit fixes a bug where `MacUpdater`
attempts to log the server port before it is listening. The existing log
event is still recorded, without the server address. When the server is
listening, a new event is recorded that includes the server address.
@changeset-bot
Copy link

@changeset-bot changeset-bot bot commented Aug 12, 2021

🦋 Changeset detected

Latest commit: 5c7a24c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
electron-updater Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Loading

@paulrosania paulrosania changed the title Fix null object error in electron-updater on macOS fix: Resolve null object error in electron-updater on macOS Aug 12, 2021
@mmaietta mmaietta changed the title fix: Resolve null object error in electron-updater on macOS fix(electron-updater): null object error when MacUpdater logs server port before it is listening Aug 14, 2021
@mmaietta mmaietta merged commit ca0e845 into electron-userland:master Aug 14, 2021
8 checks passed
Loading
@paulrosania paulrosania deleted the fix-proxy-server-logging branch Aug 14, 2021
@aguynamedben
Copy link
Contributor

@aguynamedben aguynamedben commented Sep 5, 2021

This was a painful one for us. Luckily we caught it right after a deploy, but it would have broken autoupdates for all of our users.

Loading

@amacneil
Copy link

@amacneil amacneil commented Sep 16, 2021

Unfortunately we shipped this to production and broke auto updates for all our mac users.

Loading

csett86 added a commit to jitsi/jitsi-meet-electron that referenced this issue Nov 5, 2021
Since release 2.9.1 autoupdate was broken (only!) on mac, due to
electron-userland/electron-builder#6149 being
part of the used version of electron-updater

Revert back to stable electron-updater
csett86 added a commit to jitsi/jitsi-meet-electron that referenced this issue Nov 5, 2021
Since release 2.9.1 autoupdate was broken (only!) on mac, due to
electron-userland/electron-builder#6149 being
part of the used version of electron-updater

Revert back to stable electron-updater
csett86 added a commit to jitsi/jitsi-meet-electron that referenced this issue Nov 5, 2021
Since release 2.9.1 autoupdate was broken (only!) on mac, due to
electron-userland/electron-builder#6149 being
part of the used version of electron-updater

Revert back to stable electron-updater
csett86 added a commit to jitsi/jitsi-meet-electron that referenced this issue Nov 6, 2021
Since release 2.9.1 autoupdate was broken (only!) on mac, due to
electron-userland/electron-builder#6149 being
part of the used version of electron-updater

Revert back to stable electron-updater
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants