element-desktop: Crash `Recvmsg error: Connection reset by peer (104) Trace/breakpoint trap (core dumped)`

Steps to reproduce

  1. Open element
    $ element-desktop
    /home/user/.config/Element exists: yes
    /home/user/.config/Riot exists: no
    No update_base_url is defined: auto update is disabled
    Fetching translation json for locale: en_EN
    Changing application language to en-us,en
    Fetching translation json for locale: en-us
    Fetching translation json for locale: en
    Resetting the UI components after locale change
    Resetting the UI components after locale change
    Changing application language to en-us
    Fetching translation json for locale: en-us
    Resetting the UI components after locale change
    [141732:0919/210047.337243:ERROR:broker_posix.cc(40)] Recvmsg error: Connection reset by peer (104)
    Trace/breakpoint trap (core dumped)
    
  2. Leave the client opened

Outcome

What did you expect?

No crash.

What happened instead?

Crash

Operating system

Arch Linux

Application version

element-desktop 1.11.4-1

How did you install the app?

aur

Homeserver

frogg.ie on docker running matrixdotorg/synapse:latest. Not sure how to get version from the container.

Will you send logs?

Yes

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 22
  • Comments: 77 (13 by maintainers)

Most upvoted comments

Confirming that disabling search (Profile picture -> All settings -> Security and Privacy -> Message Search -> Manage --> Disable) solved the issue for me as well.

Element version: 1.11.20
Olm version: 3.2.12

Element Desktop installed via AUR on Arch.

Reinstalling the package on Arch Linux does not fix the problem. It goes away when the message search index for encrypted rooms is completed. By disabling and re-enabling the message search I can reproduce this issue reliably.

msi-fs8

On fedora 37 and element-desktop installed through flatpak crashes for me too. I am using Wayland.

[3 zypak-helper] Wait found events, but sd-event found none
/home/<username>/.var/app/im.riot.Riot/config/Element exists: yes
/home/<username>/.var/app/im.riot.Riot/config/Riot exists: no
LaunchProcess: failed to execvp:
xdg-settings
Gtk-Message: 13:03:59.201: Failed to load module "canberra-gtk-module"
Gtk-Message: 13:03:59.201: Failed to load module "pk-gtk-module"
Gtk-Message: 13:03:59.202: Failed to load module "canberra-gtk-module"
Gtk-Message: 13:03:59.202: Failed to load module "pk-gtk-module"
[3:1211/130359.216754:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[3:1211/130359.216789:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Starting auto update with base URL: https://packages.element.io/desktop/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
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Changing application language to en-us
Fetching translation json for locale: en-us
Resetting the UI components after locale change
[50:1211/130411.537512:ERROR:broker_posix.cc(40)] Recvmsg error: Connection reset by peer (104)
/app/bin/element: line 10:     3 Trace/breakpoint trap   (core dumped) env TMPDIR="$XDG_RUNTIME_DIR/app/${FLATPAK_ID:-im.riot.Riot}" zypak-wrapper /app/Element/element-desktop $FLAGS "$@"

Happens to me on Ubuntu 22.04 LTS with Element installed from the official PPA: element-desktop | 1.11.28 | https://packages.riot.im/debian default/main amd64 Packages. Disabling message indexing mitigates the issue here too.

I cleared the data of the Flatpak version and reinstalled it, and it’s still happening.

I started getting this kind of crash frequently with a self-built element fork (SchildiChat) on Arch linux, I think since the 1.11.17 merge. A week ago, I downgraded electron in element-desktop/package.json from version 22 back to 21, and it hasn’t crashed anymore since then. So at least for me, looks like something broke with electron 22. From my experiments on my machine, it didn’t relate to message search this time, but rather what happens when the client loses focus? Not sure. Using wayland/sway.

Yes, the flatpak is maintained by a community member: https://github.com/flathub/im.riot.Riot/

Confirming that disabling search (Profile picture -> All settings -> Security and Privacy -> Message Search -> Manage --> Disable) solved the issue for me as well.

Element version: 1.11.20
Olm version: 3.2.12

Element Desktop installed via AUR on Arch.

This so far is what works for me. I just have to be fast about it before the window closes.

I installed the official deb Packages on a freshly installed Debian 11 bullseye and indeed couldn’t reproduce any crash. While on the same system I could reproduce the crash during indexing using the flatpak package, which can be mitigated by disabling the search index.

Can confirm that disabling the search inside Element settings fixes the crash.

Element app reports:

Element version: 1.11.23
Olm version: 3.2.12

Flatpak version:

$ flatpak --version
Flatpak 1.12.7

$ flatpak list  | grep -i riot
Element im.riot.Riot    1.11.23 stable  system

On Fedora 35 (oops I know… need to update), with X11.

I experienced this crash throughout the last few days since I installed Element 1.11.17 as a flatpak on Fedora 37. Element usually crashes within a couple of seconds to minutes when I run it and often looses the whole session. Obviously very annoying.