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
fix(electron-updater): null
object error when MacUpdater logs server port before it is listening
#6149
Conversation
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 detectedLatest commit: 5c7a24c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
null
object error in electron-updater
on macOSnull
object error in electron-updater
on macOS
null
object error in electron-updater
on macOSnull
object error when MacUpdater logs server port before it is listening
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. |
Unfortunately we shipped this to production and broke auto updates for all our mac users. |
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
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
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
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
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
This PR addresses an issue where macOS updates fail due to a
null
object reference.Node's HTTP server
address()
method returnsnull
until the server is listening for connections.electron-updater
4.4.4 and 4.4.5 contain a bug whereMacUpdater
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.