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

The Flatpak version of Element keeps signing me out or gets stuck in the loading screen once opening it after cold boot. #481

Open
gmanskibiditoilet opened this issue Oct 19, 2024 · 12 comments

Comments

@gmanskibiditoilet
Copy link

When i tried to open my Linux Mint pc after a cold boot, then open the app, the app gets stuck in the loading screen for too long, so i had to quit and open again, this time it signed me out of the client. then i had to sign in again but it still gets stuck in the login screen and did not load into the main interface. so i had to open the app again, sign in again, then finally got into the main interface. how annoying is it.
i hope the devs will fix it ASAP :((
image

@LinAGKar
Copy link

This is something I noticed too. If you exit the application when it stuck like that, it may still have processes running in the background, and if you reopen the application without killing those processes first, it will log you out.

@konomikitten
Copy link

Probably the same as #475.

@meyou69
Copy link

meyou69 commented Oct 31, 2024

I can confirm.

I have this issue as well on Fedora 40 KDE Spin. It's very annoying.

@aZa1905
Copy link

aZa1905 commented Nov 11, 2024

openSUSE Leap 15.5 with KDE. Same Problem with Flatpak.

@andriusign
Copy link

andriusign commented Nov 21, 2024

Same issues #490. How is this being resolved? @SISheogorath FYI

@SISheogorath
Copy link
Collaborator

SISheogorath commented Nov 24, 2024

If we want to resolve this the first step is to make it reproducible.

If this affects you, it would be useful to collect some data about your environment. What desktop environment are you running? What free desktop secrets service are you running? Was an Element process still running in background? What are your Element settings?

Then try to build a VM or general environment that reproduces the issue deterministicly. I assume that's 60% of the work that needs to be done to resolve this, but it can only be done by the people affected.

@gmanskibiditoilet
Copy link
Author

LM cinnamon 22, i am not running any secrets service, i killed all element tasks before signing in so no element tasks running in the background
i keep the element settings by default.

@andriusign
Copy link

andriusign commented Nov 24, 2024

If we want to resolve this the first step is to make it reproducible.

If this affects you, it would be useful to collect some data about your environment. What desktop environment are you running? What free desktop secrets service are you running? Was an Element process still running in background? What are your Element settings?

Then try to build a VM or general environment that reproduces the issue deterministicly. I assume that's 60% of the work that needs to be done to resolve this, but it can only be done by the people affected.

Please check the ticket #490, environbment info was provided. It was not only on my machine, but on my friend's as well. Every since the last update, Element flatpak signed out user on every run. We switched back to native Element Desktop version (non-flatpak) and it works just fine.

@SISheogorath
Copy link
Collaborator

SISheogorath commented Nov 28, 2024

So here is how I could kind of reproduce the issue:

  1. I went to download a fresh copy of Linux Mint 22 cinnamon and got it installed in a VM
  2. I installed the latest updates
  3. I enabled installation of unverified software
  4. I installed Element from Flathub
  5. I started from the launcher, not the console, Element, logged in
  6. I rebooted the machine
  7. I started Element from the Launcher and get stuck with the spinner
  8. I close Element using the tray icon
  9. I run ps aux | grep element
  10. I run flatpak ps
  11. It breaks, if you start Element now once again, while the two processes remain active in background.
sheogorath@linuxmint-vm:~$ ps aux | grep element
sheogor+    1905  0.0  0.0   3580  2048 ?        S    01:34   0:00 bwrap --args 40 -- /app/bin/element
sheogor+    1938  0.0  0.0   3580  1408 ?        S    01:34   0:00 bwrap --args 40 -- /app/bin/element
sheogor+    1939  1.7  2.4 1212313516 196620 ?   Sl   01:34   0:00 /app/Element/element-desktop --enable-features=WebRTCPipeWireCapturer
sheogor+    1951  0.0  0.9 34198064 73344 ?      S    01:34   0:00 /app/Element/element-desktop --type=zygote --no-zygote-sandbox
sheogor+    1957  0.0  0.0   3580  2048 ?        Ss   01:34   0:00 bwrap --args 40 -- /app/bin/zypak-helper child - /app/Element/element-desktop --type=zygote
sheogor+    1966  0.0  0.0   3580  1408 ?        S    01:34   0:00 bwrap --args 40 -- /app/bin/zypak-helper child - /app/Element/element-desktop --type=zygote
sheogor+    1967  0.0  0.9 34198112 73856 ?      S    01:34   0:00 /app/Element/element-desktop --type=zygote
sheogor+    1998  5.5  1.0 34285420 85392 ?      Sl   01:34   0:02 /app/Element/element-desktop --type=gpu-process --enable-crash-reporter=e51bf013-cfcb-4b37-a977-afd97e8c69fa,no_channel --user-data-dir=/home/sheogorath/.var/app/im.riot.Riot/config/Element --gpu-preferences=UAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAABgAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAABAAAAAAAAAAEAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAA --shared-files --field-trial-handle=3,i,5693740886604812097,13495806768830359800,262144 --enable-features=WebRTCPipeWireCapturer --disable-features=HardwareMediaKeyHandling,MediaSessionService,SpareRendererForSitePerProcess --variations-seed-version
sheogor+    2017  0.0  1.2 33985572 96512 ?      Sl   01:34   0:00 /app/Element/element-desktop --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --enable-crash-reporter=e51bf013-cfcb-4b37-a977-afd97e8c69fa,no_channel --user-data-dir=/home/sheogorath/.var/app/im.riot.Riot/config/Element --standard-schemes=vector --enable-sandbox --secure-schemes=vector --fetch-schemes=vector --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5693740886604812097,13495806768830359800,262144 --enable-features=WebRTCPipeWireCapturer --disable-features=HardwareMediaKeyHandling,MediaSessionService,SpareRendererForSitePerProcess --variations-seed-version
sheogor+    2074  0.6  1.0 34062328 83584 ?      Sl   01:34   0:00 /app/Element/element-desktop --type=utility --utility-sub-type=audio.mojom.AudioService --lang=en-US --service-sandbox-type=none --enable-crash-reporter=e51bf013-cfcb-4b37-a977-afd97e8c69fa,no_channel --user-data-dir=/home/sheogorath/.var/app/im.riot.Riot/config/Element --standard-schemes=vector --enable-sandbox --secure-schemes=vector --fetch-schemes=vector --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5693740886604812097,13495806768830359800,262144 --enable-features=WebRTCPipeWireCapturer --disable-features=HardwareMediaKeyHandling,MediaSessionService,SpareRendererForSitePerProcess --variations-seed-version
sheogor+    2148  0.0  0.0   9632  2560 pts/0    S+   01:34   0:00 grep --color=auto element
sheogorath@linuxmint-vm:~$ flatpak ps
Instance   PID  Application  Runtime
3737220940 1905 im.riot.Riot org.freedesktop.Platform
3404190015 1957 im.riot.Riot org.freedesktop.Platform
sheogorath@linuxmint-vm:~$ ls -la .var/app/im.riot.Riot/config/Element/
total 172
drwx------ 16 sheogorath sheogorath  4096 Nov 28 01:35  .
drwxr-xr-x  6 sheogorath sheogorath  4096 Nov 28 00:16  ..
drwx------  3 sheogorath sheogorath  4096 Nov 28 01:34  blob_storage
drwx------  3 sheogorath sheogorath  4096 Nov 28 00:16  Cache
drwx------  4 sheogorath sheogorath  4096 Nov 28 00:16 'Code Cache'
-rw-------  1 sheogorath sheogorath 20480 Nov 28 00:16  Cookies
-rw-------  1 sheogorath sheogorath     0 Nov 28 00:16  Cookies-journal
drwx------  2 sheogorath sheogorath  4096 Nov 28 00:16  Crashpad
drwx------  2 sheogorath sheogorath  4096 Nov 28 00:39  DawnGraphiteCache
drwx------  2 sheogorath sheogorath  4096 Nov 28 00:39  DawnWebGPUCache
drwx------  2 sheogorath sheogorath  4096 Nov 28 00:16  Dictionaries
-rw-r--r--  1 sheogorath sheogorath    26 Nov 28 01:34  electron-config.json
drwxr-xr-x  2 sheogorath sheogorath  4096 Nov 28 01:33  EventStore
drwx------  2 sheogorath sheogorath  4096 Nov 28 00:39  GPUCache
drwx------  4 sheogorath sheogorath  4096 Nov 28 00:41  IndexedDB
-rw-------  1 sheogorath sheogorath  4096 Nov 28 00:39  InterestGroups
drwx------  3 sheogorath sheogorath  4096 Nov 28 00:39 'Local Storage'
-rw-------  1 sheogorath sheogorath   840 Nov 28 01:35 'Network Persistent State'
-rw-------  1 sheogorath sheogorath  2103 Nov 28 01:08  Preferences
-rw-------  1 sheogorath sheogorath 20480 Nov 28 00:39  PrivateAggregation
-rw-------  1 sheogorath sheogorath     0 Nov 28 00:39  PrivateAggregation-journal
drwx------  2 sheogorath sheogorath  4096 Nov 28 01:34 'Session Storage'
drwx------  3 sheogorath sheogorath  4096 Nov 28 00:16 'Shared Dictionary'
-rw-------  1 sheogorath sheogorath  4096 Nov 28 00:18  SharedStorage
-rw-------  1 sheogorath sheogorath     0 Nov 28 00:48  SharedStorage-wal
-rw-r--r--  1 sheogorath sheogorath    92 Nov 28 01:34  sso-sessions.json
-rw-------  1 sheogorath sheogorath   188 Nov 28 00:16  TransportSecurity
-rw-------  1 sheogorath sheogorath 36864 Nov 28 00:22 'Trust Tokens'
-rw-------  1 sheogorath sheogorath     0 Nov 28 00:22 'Trust Tokens-journal'
drwx------  2 sheogorath sheogorath  4096 Nov 28 00:34  WebStorage
-rw-r--r--  1 sheogorath sheogorath   143 Nov 28 01:34  window-state.json

What was observed?

The tray icon disappeared as if the Element instance had terminated, but as the output of the commands show, there are still 2 instances running. However, there is no longer an instance lock.

What can we conclude from that?

Since a missing session lock, but multiple writers are not supported by Element, we'll probably get corrupted session data.

Given that we have multiple people saying it's happening only in the flatpaked version and we do some fancy on-the-fly injection using LD_PRELOAD with zypak-wrapper, it's potentially related to that.

Alternative explanation, given that it seems to effect people running Linux Mint with cinnamon, which only runs on X11, it might be an X11 related bug.

What are the next steps?

Someone, not me, figures out, what the low-level problem is and talks to the necessary people to get it fixed. It's probably not directly related to this specific flatpak, but rather one of the base technologies, either upstream Element, zypak or Electron itself.

@daenney
Copy link
Contributor

daenney commented Dec 2, 2024

Alternative explanation, given that it seems to effect people running Linux Mint with cinnamon, which only runs on X11, it might be an X11 related bug.

This has been happening to me too. My setup is Gnome 47 on Arch Linux, running Wayland.

I have no clue how to reproduce it. It happens about once every other month or so. After a (re)boot the app just spins. Once you quit it and then try to start it again you get this. It feels like this may happen if the network isn't quite up yet but the application gets started, as this happens consistently on my laptop (WiFi) but never on my desktop (wired). The app is set to start on login in my case.

@daenney
Copy link
Contributor

daenney commented Dec 2, 2024

#465 seems to also be this issue.

@DemiMarie
Copy link

This also affects users running Qubes OS.

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

No branches or pull requests

9 participants