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 Linux crash #2022

Merged
merged 2 commits into from Oct 11, 2023
Merged

Fix Electron Linux crash #2022

merged 2 commits into from Oct 11, 2023

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented Oct 10, 2023

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.

@github-actions
Copy link

github-actions bot commented Oct 10, 2023

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 43.67 kB 13.40 kB
After 43.67 kB 13.40 kB
± No change No change

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 02e7bad

Copy link
Contributor

@twometresteve twometresteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from my perspective.

@lemnik lemnik force-pushed the PLAT-10961/electron-linux-crash branch from 40e9d2a to fe8e88f Compare October 11, 2023 07:50
@lemnik lemnik force-pushed the PLAT-10961/electron-linux-crash branch from fe8e88f to 02e7bad Compare October 11, 2023 10:00
@lemnik lemnik merged commit 775699d into next Oct 11, 2023
68 checks passed
@gingerbenw gingerbenw mentioned this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants