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
merged 2 commits into from Aug 14, 2021

Conversation

tessro
Copy link
Contributor

@tessro tessro 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 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

@tessro tessro 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
@tessro tessro deleted the fix-proxy-server-logging branch August 14, 2021 03:44
@aguynamedben
Copy link
Contributor

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.

@amacneil
Copy link

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

csett86 added a commit to jitsi/jitsi-meet-electron that referenced this pull request 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 pull request 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 pull request 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 pull request 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
d3473r pushed a commit to d3473r/jitsi-meet-electron that referenced this pull request Sep 1, 2023
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