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

Nightly (using electron 25.1.x) crashes on launch on wayland (sway) #1026

Closed
nidico opened this issue Jun 19, 2023 · 19 comments
Closed

Nightly (using electron 25.1.x) crashes on launch on wayland (sway) #1026

nidico opened this issue Jun 19, 2023 · 19 comments

Comments

@nidico
Copy link

nidico commented Jun 19, 2023

Steps to reproduce

Launching element-desktop-nightly in wayland native mode on sway fails since around a week - most likely since 3d2006c (upgrades electron from 24.x to 25.x). Electron is now at 25.1.0.

In order to reproduce, run:

element-desktop-nightly --enable-features=UseOzonePlatform --ozone-platform=wayland

Outcome

The application immediately crashes, the logs tell:

Enabling Sentry with dsn=https://029a0eb289f942508ae0fb17935bd8c5@sentry.matrix.org/6 environment=nightly
Starting auto update with base URL: https://packages.element.io/nightly/update/
Auto update not supported on this platform
Fetching translation json for locale: en_EN
Changing application language to en-us
Fetching translation json for locale: en-us
Resetting the UI components after locale change
Resetting the UI components after locale change
zsh: segmentation fault  element-desktop-nightly --enable-features=UseOzonePlatform 

This issue is similar to #873, but doesn't require any fancy dual monitor config and also doesn't yield the same error message, therefore I filed a separate issue. Also, it is worse, as there is no workaround here (apart from running in xwayland mode).

Operating system

Debian Linux (Bookworm)

Application version

Element nightly 2023061901

How did you install the app?

element.io deb repository

Homeserver

matrix.org

Will you send logs?

No

@t3chguy
Copy link
Member

t3chguy commented Jun 19, 2023

I suggest opening an issue at https://github.com/electron/electron

@nidico
Copy link
Author

nidico commented Jun 19, 2023

I suggest opening an issue at https://github.com/electron/electron

Well there is already electron/electron#37531 which is kind of a catch-all issue for various wayland crashes on launch. I also linked to this (element-desktop) issue in the comments.

Unfortunately, I cannot provoke the crash with https://github.com/electron/electron-quick-start or https://github.com/oli-moreau/electron-quick-start-wayland so I don't have a better "minimal test case" than launching element-desktop ...

@t3chguy
Copy link
Member

t3chguy commented Jun 19, 2023

Element cranks up all the security & sandboxing settings, those may be related

@artificial-intelligence

maybe this bugreport is also relevant or helps finding the root cause: ostreedev/ostree#2900

@travier
Copy link

travier commented Jun 26, 2023

Un-maximizing the window makes the application work again for me: flathub/im.riot.Riot#376 (comment)

@travier
Copy link

travier commented Jun 26, 2023

maybe this bugreport is also relevant or helps finding the root cause: ostreedev/ostree#2900

This is another unrelated bug that happened at the same time.

@pm4rcin
Copy link

pm4rcin commented Jun 28, 2023

Un-maximizing the window makes the application work again for me: flathub/im.riot.Riot#376 (comment)

doesn't work for me on Sway

@532910
Copy link

532910 commented Jun 28, 2023

@nidico does 1.11.34 works for you?

@nidico
Copy link
Author

nidico commented Jun 29, 2023

@nidico does 1.11.34 works for you?

Yes! Element stable 1.11.34 with Electron 25.1.0 doesn't crash when launched in wayland mode!

Element-nightly 2023062901 with Electron 25.2.0 still crashes on launch in wayland mode.

@pm4rcin
Copy link

pm4rcin commented Jun 29, 2023

@nidico which DE/WM do you use?

@nidico
Copy link
Author

nidico commented Jun 29, 2023

@nidico which DE/WM do you use?

Sway 1.8.1 (edit: from Debian bookworm packages)

@pm4rcin
Copy link

pm4rcin commented Jun 29, 2023

Well on Sway it still crashes for me. I was able to open it once when removed folder in .var but now even if I do that it still segfaults.
EDIT: I'm on Fedora Sericea.

@pm4rcin
Copy link

pm4rcin commented Jun 30, 2023

Here's how to workaround it on KDE (someone please confirm that on GNOME too) flathub/im.riot.Riot#376 (comment) and sway flathub/im.riot.Riot#376 (comment). Also looks like Signal has the same problem signalapp/Signal-Desktop#6247.
EDIT: Tutanota flatpak crashes too as it uses electron 25.2

@Stunkymonkey
Copy link

this fixed it for me in the sway config: for_window [app_id="Element"] floating enable

@ghost
Copy link

ghost commented Aug 21, 2023

Thank you @Stunkymonkey, that workaround works for signal-desktop 6.28.0 too!

@0xC0ncord
Copy link

this fixed it for me in the sway config: for_window [app_id="Element"] floating enable

Unfortunately this (setting a floating rule for Element/Signal) doesn't seem to workaround the crash on Hyprland.

@pm4rcin
Copy link

pm4rcin commented Sep 14, 2023

It looks like Electron 26 has fixed the issue. No more crashes for me. I've also experienced problems with tutanota but they also updated to 26 and it works flawlessly now. :)

@talex5
Copy link

talex5 commented Sep 14, 2023

With electron 26, element-desktop runs OK for me, but it now segfaults when I close the window to exit.

@Noah-Huppert
Copy link

Noah-Huppert commented Dec 14, 2023

I didn't find any of the above solutions worked. However I did find that the issue was with how I launched apps with Sway.

While I was having the problem my Sway config has:

bash -c 'wofi --show drun | { read -r id name; swaymsg "[con_id=$id]" focus; }'

I was seeing that I couldn't launch Signal Desktop from my app launcher, but I could run it via the command line. Eventually I simplified my Sway config to:

set $menu exec wofi --show drun

Now Signal desktop launches.

I think it had to do with environment variables not being imported or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants