Electron apps crashing when starting them on Fedora 40

Hello everyone!

After distro-hopping and using EndeavourOS for some time (because last year I was unable to install Hyprland on Fedora since I am a Linux noob and I lacked the skills to compile it…etc), now I finally came back to Fedora (I find it a good balance with updated software and stability even though I have never broke my EndeavourOS system) since now it is easy to install Hyprland with COPR repo.

Having said that, I am having issues with electron apps such as Discord and Obsidian. They do not start. They try to start and crash. I tried opening them from terminal, Obsidian just says:

Segmentation fault (core dumped)

And when I try opening Discord, it gives these errors before crashing:

legacyModuleUpdater: update-check-finished
2024-09-19T11:36:28.820Z [Modules] Starting to install discord_rpc…
2024-09-19T11:36:28.820Z [Modules] Fetching discord_rpc@1 from https://discord.com/api/modules/stable/discord_rpc/1
2024-09-19T11:36:28.820Z [Modules] Streaming discord_rpc@1 to /home/garo/.config/discord/0.0.67/modules/pending/discord_rpc-1.zip
Segmentation fault (core dumped)

And it crashes as well. I am not very technical, and I am still kind of Linux noob (using since around 18 months) so to try to understand the reason, I searched on google for the discord_rpc but I could not find an issue like mine.

I found some info about electron apps crashing on the kernels above 6.9 where the “unpermitted memory access” is blocked and electron apps are crashing. But this seems weird to me because my EndeavourOS was on the latest kernel as well (I don’t remember which one, but it was just before installing Fedora 40 Workstation last week) and it worked.

Just to experiment, I have discovered distrobox last week, and I am running Affinity Photo thru it with a wine fork, thru arch container (I was able to have it work in all the distros I tried such as Arch based, Ubuntu/Linux Mint, Open Suse…etc except Fedora) and I tried installing Discord and Obsidian thru an Ubuntu container in distrobox (on Arch container I faced the same issue that I face on Fedora) and it works flawlessly.

But again it doesn’t make sense as the Ubuntu container, even though it is 22.04…etc, it should be using the kernel of my host system, so the issue should persist, but both Discord and Obsidian works flawlessly.

Someone who uses Fedora with the latest kernels, told me that he hasn’t got any issues running electron apps on the latest kernel. So not knowing what else to do, I wanted to ask here for if you could point me to the right direction.

I tried it on two computer, running almost Fresh install of Fedora 40 Workstation (I had only installed Hyprland, i3wm, neovim, ohmybash and in one of them nvidia drivers as well.) and the result is the same. Specs of the computers are below, they pretty recent:

Laptop:

  • AMD 6800HS cpu
  • Integrated AMD Radeon 680m gpu
  • 16 gb ram
  • 1 tb ssd

Desktop:

  • AMD Ryzen 7600x cpu
  • Nvidia RTX 4070 Super GPU
  • 64 gb DDR5 ram
  • 2 tb ssd

I tried to lunch the apps (Discord, Obsidian) in:

  • Hyprland
  • Gnome
  • Gnome on Xorg
  • i3wm

to see if it was a problem related to Wayland but I have the same issue on all of them. I have also tried opening, installing both with:

  • Dnf (in case of Discord with RPMFusion repo)
  • Flatpak
  • AppImage (in case of Obsidian)

And the problem persists.

Sorry for the long post!

Thank you for any help, in advance!

EDIT:
I was able to fix it, after installing a different cursor theme. There was a kind of a weird bug on my cursor which I had ignored, after installing Hyprland. On Gnome, my cursor seemed like a square. I could not change any cursor theme on Gnome Tweaks. So I installed a different cursor theme, and then I had the drop down on Gnome Tweaks let me select cursor style. After changing it, now the electron apps work flawlessly! Sorry for the useless post!

Welcome to Fedora @astonish

Congratulation for your fist Topic, It looks nice and it shows that you made some tests before reporting your problem.

You gave feedback and found a own solution. This way it is not an useless post! It can help others.

You could copy and paste your Edit into a new answer and then mark it as solution. This way your topic gets the status as solved and we can search for it when we want to give priority to solved topics.

2 Likes

Hello! Thank you very much for your warm welcome! It was an issue that was driving me crazy and I saw in a Reddit post, someone giving this advice for a similar problem, which was not exactly the same but similar and I remembered that on Gnome, my mouse looked like a square, so I decided to give it a try and it worked! :slight_smile: Ok then I will do as you have suggested.

So my Fedora was a fresh install, but not fresh enough. Apparently, there was something clashing between Hyprland, Gnome and i3wm which was messing my mouse cursor in Xorg but also on Wayland Gnome. When I went to Gnome-tweaks app, it would not select any other cursor as I had only the default cursor installed. So to resolve:

  • I booted to Gnome.
  • I went to download a custom cursor.
  • I placed the downloaded custom cursor folder in ~/.local/share/icons folder.
  • I opened the Gnome-tweaks app and selected the newly installed cursor. If you see it already selected but the cursor not changing, select the default cursor theme and then reselt the newly downloaded cursor theme, you will see that it changes. (It happenned to me on both of my computers)
  • Then if you are using also Hyprland or any other Wayland compositor like me, log-in to it and with the app called nwg-look, select the new cursor theme there as well.
  • Reboot.

This should fix the issue and now you can easily run electron apps again. This fix worked on both of my computers!

Cheers!

1 Like