electron: Electron 36 fails to launch because "Using GTK 2/3 and GTK 4 in the same process is not supported"
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
36.0.0-alpha.1 through 36.0.0-beta.2
What operating system(s) are you using?
Ubuntu
Operating System Version
23.10
What arch are you using?
x64
Last Known Working Electron version
35.*
Expected Behavior
When running Fiddle on Ubuntu with X11, launching the default template works
Actual Behavior
Launching the default template using any of the current 36.X beta and alpha releases fails with the following error:
Electron v36.0.0-alpha.1 started.
(process:12023): Gtk-ERROR **: 11:30:38.382: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported
Electron exited with signal SIGTRAP.
Testcase Gist URL
Default fiddle template shows this
Additional Information
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 33
- Comments: 32 (10 by maintainers)
Commits related to this issue
- chore(deps): electron@36.0.0, latest others - add workaround for https://github.com/electron/electron/issues/46538 - regenerate screenshots - regenerate lock file https://github.com/electron/electron... — committed to wixplosives/example-electron-application by AviVahl 2 years ago
- fix: workaround for GTK version mismatch 0.3.12 would fail to start on linux with: > (process:601700): Gtk-ERROR **: 15:50:44.800: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same proce... — committed to supernoter/noter by miku 2 years ago
- fix(launcher): work around electron bug Force the use of GTK3 to work around https://github.com/electron/electron/issues/46538. — committed to jkoelker/claude-desktop-native by jkoelker 2 years ago
- Fix not launching on GNOME Reference: https://github.com/electron/electron/issues/46538 Also improves the chromium switch code — committed to Vencord/Vesktop by Vendicated 2 years ago
- Fix the desktop version after breaking change of the Electron (#502) **User-Facing Changes** <!-- will be used as a changelog entry --> **Description** Fixed issue using the workaround, forcing GTK ... — committed to lichtblick-suite/lichtblick by luluiz 2 years ago
- Fix for https://github.com/electron/electron/issues/46538 — committed to dtcooper/tomato by dtcooper 2 years ago
- upgpkg: discord-electron-openasar 0.0.95+834-1 upstream release Update Electron version to 36 again by using workaround: https://github.com/electron/electron/issues/46538#issuecomment-2790356082 — committed to archlinux/aur by SunRed 2 years ago
- Fix https://github.com/electron/electron/issues/46538 — committed to archlinux/aur by deleted user a year ago
- Reverted back to v34.4.1+wvcus due to electron gtk bug https://github.com/electron/electron/issues/46538 — committed to archlinux/aur by coreybruce a year ago
- Reverted back to v34.4.1+wvcus due to electron gtk bug https://github.com/electron/electron/issues/46538 also updated checksum — committed to archlinux/aur by coreybruce a year ago
- fix: Linux GTk 3 vs. 4 see https://github.com/electron/electron/issues/46538 — committed to edrlab/thorium-reader by danielweck a year ago
- Fix launching of electron version on Linux Should avoid message stating that "GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported" (cf. https://github.com/electron/... — committed to riatelab/magrit by mthh a year ago
- Fix launching of electron version on Linux Should avoid message stating that "GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported" (cf. https://github.com/electron/... — committed to riatelab/magrit by mthh a year ago
- Use gtk-version=3 unless specified otherwise - https://github.com/electron/electron/issues/46538 — committed to HiveGamesOSS/Chunker by HiveGames-OSS a year ago
- Update electron, which should fix https://github.com/electron/electron/issues/46538 — committed to lockdown-systems/cyd by micahflee a year ago
- bump electron from 36 to 37 - allows us to remove the fix for https://github.com/electron/electron/issues/46538 - no breaking changes for us based on release notes — committed to votingworks/kiosk-browser by adghayes a year ago
Happens in latest Manjaro, too. I ran into it on Slack. The
--gtk-versionflag is [obviously] undocumented but works fine.setting
gtk-version=3works for me. For other people encountering this thread, you can pass it at a command line argument, and you can also set that in your main init script:the working solution is to add a gtk-version flag to your start command example: electron . --gtk-version=3
Tracked back to https://chromium-review.googlesource.com/c/chromium/src/+/6310469 and seems specific to Mate per conversation with @Kilian - this can be worked around by passing
--gtk-version=3on startup as well.The doc says “In rare cases, this may cause some applications or configurations to error” It fails on Fedora 42. 😦 Not rare at all.
EDIT: workaround works
Also breaks slack-desktop on ArchLinux https://aur.archlinux.org/packages/slack-desktop#comment-1024447
… and here on Debian 12.
Issue is fixed as of Electron 37.0.0. Verified on both Fedora 42 and latest Arch Linux (both fully updated).
The issue is also found in Fedora Linux 42. Using
--gtk-version=3in thestartcommand works as mentions by others.workaround on linux: use flag
--gtk-version=3. and run from command line, or change your desktop entry to include it. it works. tested on Arch Linux x86_64Has this issue been resolved? it’s quite annoying that you need to add the launch argument to the binary just to make it run.
Was this resolved with Electron 37? if so do I need to wait for Electron 37.x.x to be released?
My similar issue also seems be resolved in 37.0.0 at first glance, no GTK warnings and the dialog opens without crashing.
This might be a little off-topic but while
--gtk-version=3(not 4) let me launch the process - it doesn’t seem to properly extend to subprocesses that electron creates; CallingwebContents.print()produces a GTK warning for me and prevents the print dialog from opening. (I will note that executing “window.print()” in the view works fine without warnings; but this is not ideal in our case.)Last week this also came with a message of a subprocess crashing with child-process-gone, but this week I can’t reproduce the crash message on the same versions and hardware. Because of the inability to reliably call webContents.print in v36, we are downgrading to 35 though.
Some system information: Oracle Linux 9.6 (redhat/fedora-based) Running under mutter/wayland with gnome-kiosk-script-session Seems to have GTK4 and GTK3 installed as dependencies of gdm and gnome-kiosk respectively. When I test installing gnome-kiosk, both 3 and 4 get installed. Removing either will remove gdm and/or gnome-kiosk.
gdm.x86_64 1:40.1-28.0.1.el9_6 ol9_appstream gnome-kiosk 40.0-7 mutter 40.9-24 libwayland-* 1.21.0 gtk3 3.24.31-5 gtk4 4.12.3-2
My system uses gtk4 by default (GNOME 48 on Wayland), but has gtk3 installed for certain apps that did not migrate (yet), and I have the same error message. So this does not only impact the old distros. This might be because of libraries installed for “backwards compatibility” or something. The_ command line switch --gtk-version=3 works just fine. Can someone explain what component/lib triggers this error in which situation? I’d like to help pinpoint the cause so people might be able to fix this on their systems.
Yeah, we (https://podman-desktop.io/) are also facing it on fedora 42
Blocking this until we add a callout to breaking changes doc, but I don’t think fixing the issue itself should block stable
23.04 is kinda old indeed, but I still would expect it to keep working.
The last working electron version is 36.0.0-nightly.20250303. The error first appears in 36.0.0-nightly.20250304.
I’ve tested Electron 36.0.0-beta.4 on my very old Ubuntu 20.04.4 LTS, and the app can run normally, both in development mode and when packaged as AppImage.