Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
Fix an Electorn crash on Linux that can be triggered on startup, when we attempt to access the
electron.powerManager
before it is fully accessible.Accessing the powerManager before
app.whenReady
can cause Electron to access the Chromium Bluez stack (in order to reach the dbus client) before the Bluez code has been properly initialized. This in turn causes an assertion in the Chromium Bluez integration to fail, triggering an immediate crash.Testing
Updated CI to cover more versions of Electron and Linux, and tested both the original crash and fix manually.
This PR removes two of the unit tests which are problematic on Linux as they used complete Electron stacks which (depending on the distro) caused Jest to either not run the test at all, or hang while testing. Future tasks will be raised to fix these tests.