flathub / im.riot.Riot

https://flathub.org/apps/details/im.riot.Riot
33 stars 45 forks source link

Crash a few second after opening - Ubuntu 22.10 #322

Open ahangarha opened 1 year ago

ahangarha commented 1 year ago

Recently I decided to use Element from flatpak. I could install, sign in, and verify my account but the app crashes a few seconds after I open it.

This is the terminal log when I run the app from terminal:

LaunchProcess: failed to execvp:
xdg-settings
Gtk-Message: 15:46:25.875: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:46:25.876: Failed to load module "canberra-gtk-module"
[3:0118/154625.895675: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:0118/154625.895733: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
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Fetching translation json for locale: en_EN
Changing application language to en-us,en,en
Fetching translation json for locale: en-us
Fetching translation json for locale: en
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
[44:0118/154627.665584:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[53:0118/154638.621840: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 "$@"

Operating system

Ubuntu 22.10 (Wayland)

Application version

1.11.17

How did you install the app?

https://flathub.org/apps/details/im.riot.Riot

Homeserver

matrix.org


This might be relevant in some way: I am doing this from Iran. Ensure this might be because of either some internet filtering from the Iranian government (though I can use the app without any issue on my phone and even in those few seconds after launching the app, I can see my messages) or because of some filtering from the servers against Iranian IPs. Even in such cases, we shouldn't experience crashes.

Again, this is just a side note which might be helpful for debugging.

telometto commented 1 year ago

Known issue. It seems to be a bug that happens when message caching is enabled. To disable it: Settings > Security & Privacy > Message Search (Manage) > Disable.

ahangarha commented 1 year ago

I quickly made this change and so far it is working fine.

If this is something to be fixed on the main project, please let me know how to report this.

ripper81 commented 1 year ago

I don´ t even get this far because the app crashes within seconds. Please release a fix for it.

SISheogorath commented 1 year ago

I've finally found some time to look into this issue, sadly not with the wanted success. It's clear that it originates from the search code. So far I could isolate, that it doesn't seem to be related to the sqlcipher library itself and not to zypak wrapper.

For now, the only way to avoid it is to drop search support for encrypted messages. However I don't know how large the number of impacted user by the crashes is, and I don't know how many people use search for encrypted conversations. Therefore the trade-off is hard to calculate.

telometto commented 1 year ago

@SISheogorath Does this happen on the non-flatpak version too? Could be an issue with the flatpak. It's odd, however, because up until a few months ago, everything seemed to work fine; even with the indexing enabled. By the way, maybe you know which parameter/conf-file @ripper81 could make changes to in order to allow him to open the app? Where can one disable indexing without accessing the GUI?

-Cheers :)

SISheogorath commented 1 year ago

Sadly no, I couldn't find any way to disable it, without using the UI.

GoofyAF commented 1 year ago

This isn't a solution for the bug, but if you want to disable message caching on an Element flathub app that is already in a crash cycle:

  1. Open the app
  2. Quickly click on the logout option/button/hyperlink as the app is starting up
  3. Sign in again (perhaps skip the 'verify session' step)
  4. Click on your user Icon at the upper left of the Element window
  5. Select the 'Security & Privacy' menu shortcut (can also find this option via 'Settings')
  6. Disable 'Message Search'

That process let me get element desktop working again on my computer.

ProbstDJakob commented 1 year ago

If you can't log out, you could also delete the data directory at ~/.var/app/im.riot.Riot.

t3chguy commented 1 year ago

Maybe the flatpak shouldn't include the matrix-seshat native dependency if it is known to be incompatible with it?

SISheogorath commented 1 year ago

Since this flatpak is only repacking upstream, that's not really an option. The dependencies we built as part of this flatpak, namely sqlcipher, has been tested to be replaced with the same sqlcipher package that upstream uses, however, this didn't solve it.

Only removing sqlcipher entirely would be an option which "breaks" matrix-seshat and disables search support entirely. But this also results in a bunch of places showing "Hey, how about you download the Element Desktop App", which might causes more confusion than it helps.

janvlug commented 1 year ago

Confirming on Fedora 37.

develroo commented 1 year ago

Just wanted to add this is happening on flatpak Version: 1.11.23 on Gnome (43.2) Wayland. (Debian Testing). It happens both in full screen and half screen modes.

Element-Desktop-Flatpak-problem

Element-flatpak-problem-2

yajo commented 1 year ago

FWIW this is seems to be a duplicate of https://github.com/vector-im/element-desktop/issues/648