Repository navigation
fix(linux): avoid Wayland kMinimized FATAL on tray show (#3397) - #3594
Open
ncfoster219 wants to merge 1 commit into
Open
ncfoster219 wants to merge 1 commit into
ncfoster219 wants to merge 1 commit into
Conversation
…#3397) Electron 38.2+/39 on native Wayland hits Chromium wayland_toplevel_window.cc FATAL when show() runs while the BrowserWindow is still minimized (minimize-to-tray hide path). Restore before hide on minimize-to-tray, and restore before show from tray / second-instance. Adds a small electron repro script.
Collaborator
|
Has this been tested on anything other than wayland yet just to be sure we're not breaking things for other people? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of the Change
On Linux Wayland (Electron 38.2+ / 39.x), Firebot’s minimize-to-tray path leaves the
BrowserWindowin Chromium’skMinimizedstate while hidden, then callsshow()from the tray. That triggers a Chromium Ozone FATAL:FATAL:…wayland_toplevel_window.cc:791] Should not be called with kMinimized state→ SIGTRAP.This matches electron/electron#49253 (fixed upstream only in Electron 43+ via Chromium 149). Firebot ships Electron 39.8.10.
App-side workaround (this PR):
restore()thenhide()(deferred) so the window is not left minimized while hidden.revealMainWindow(): alwaysrestore()beforeshow()for tray Show / double-click / focus.second-instance.ts.Also adds
scripts/wayland-minimize-repro.jsto reproduce crash vs fixed path with the bundled Electron.Applicable Issues
Testing
On Ubuntu 26.04 / KDE Plasma Wayland (
XDG_SESSION_TYPE=wayland), Electron 39.8.10 from this repo:Crash path (unfixed pattern):
→ exact FATAL at
wayland_toplevel_window.cc:791Fixed path:
→ survives, exits 0
Full Firebot
grunt prephits a local Vite/rolldown Node engine mismatch on this machine (Node 22.11 < required 22.12); TypeScript compile of the tray change succeeded. Recommend smoke: enable Settings → Minimize to Tray, minimize, tray Show, repeat on Wayland.Screenshots
N/A (main-process tray behavior)