SpacingBat3 / WebCord

A Discord and SpaceBar :electron:-based client implemented without Discord API.
MIT License
1.95k stars 98 forks source link

Wecord logs out at (re)boot #245

Open GribouilleVert opened 2 years ago

GribouilleVert commented 2 years ago

Aknowledgements

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

20.1.0

Application version

v3.8.1

Bug description

When my system reboots webcords logs me out and shows me this screen: image

I then need to relog, i have not encoutered this issue with the official discord client for linux.

Additional context

I am on Fedora 36, linux kernel 5.19.4-200.fc36.x86_64, i'm using Gnome 42

SpacingBat3 commented 2 years ago

Which distributable format were you using? Try native if you've tested Flatpaks, on Fedora RPMs are recommended.

SpacingBat3 commented 2 years ago

Also I wasn't able to reproduce this, it's definitely not an issue on my side. A similar issue I've encountered when merging between Electron 15 and 16, but it was resolved for quite a long time and I haven't encountered any logouts since then. Since WebCord saves its data normally in $XDG_CONFIG_HOME/WebCord or ~/.config/WebCord and I'm pretty sure Flatpaks normally save their data somewhere else (I'm not sure if this directory is persistent or not) due to sandboxing, my first guess this is not an issue with WebCord, but a problem with Flatpak sandboxing that I am not going to fix as I'm not a maintainer of Flatpak releases.

SpacingBat3 commented 2 years ago

247 suggests this issue is with the Flatpaks. This won't be fixed, see #247 for the details why.

SpacingBat3 commented 2 years ago

@GribouilleVert If you can reproduce this on officially-supported releases, just reply here. I'll reopen this as long as it is reproducible.

GribouilleVert commented 2 years ago

Hi,

Thanks for all the help, i've switch from flatpak to the rpm on the release page, unefortunately, the issue is still there :/, Additionally since i'm on fedora, i've checked se-linux logs but the is nothing.

Do not hesitate to ask for any additional details :)

SpacingBat3 commented 2 years ago

I still can't reproduce it, my guesses are either WebCord's data is cleaned after each reboot or it is somehow stored in RAM (I don't know much how your .config or XDG_CONFIG_DATA is stored).

I have no clue why logout happens for you, in earlier WebCord version there was a bug with Electron 16 (I believe it hasn't been resolved yet through in newer releases) but it is now workarounded so that should not happen anymore (if it ever happened before in WebCord's stable releases, I believe I've found this bug and prepared WebCord before I moved to next Electron version)...

GribouilleVert commented 2 years ago

Huh, could you precise your thoughts about .config and XDG_CONFIG_DATA, maybe i can checks things for you, as far as i am aware, my .config folder is stored on my disk, i use ButterFS so maybe this is an issue (altough i highly doubt it),

The XDG_CONFIG_DATA environment variable doesn't seem to exists on my system, maybe this is causing the issue ? (tried echo $XDG_CONFIG_DATA and it cas blank (fish shell))

SpacingBat3 commented 2 years ago

Huh, could you precise your thoughts about .config and XDG_CONFIG_DATA

It was that WebCord data is stored in ~/.config/WebCord or in case XDG_CONFIG_DATA is set (AFAIK) WebCord's data will be made in the path this variable stores.

(…) i use ButterFS so maybe this is an issue (altough i highly doubt it),

I've never tested how Electron behaves on brtfs, so I have no clue. I also doubt it, unless it messes up some Linux permission in some way, it should rather be functional. But just to be safe, you might check whenever it behaves correctly in a clean VM on ext4 or maybe just clean enviroment on brtfs.

timoschwarzer commented 2 years ago

I have the same problem on a fresh Arch Linux install (using the official rpm). Given that it doesn't forget everything (i.e. it still remembers what account was logged in, since it asks for reauthentication) I wonder if and how the auth token is stored differently from the rest. My system also runs on btrfs, but I don't have problems with other Electron based apps forgetting data.

GribouilleVert commented 2 years ago

I've tried on fresh installs in VMs (ext4 and btrfs) and same issue ! Also, i use EFI, maybe this causes issues, altough i doubt it.

eclairevoyant commented 2 years ago

I also saw this issue (using the AUR package webcord), but maybe it's an issue with your .config getting messed up? I just moved ~/.config/Webcord elsewhere (so the app can recreate the config folder) and the issue went away for me.

SpacingBat3 commented 2 years ago

I also saw this issue (using the AUR package webcord), but maybe it's an issue with your .config getting messed up? I just moved ~/.config/Webcord elsewhere (so the app can recreate the config folder) and the issue went away for me.

It could be that, but I'm pretty sure that if he tested WebCord for like the three times in the row in VM on official releases (runs with Flatpaks shouldn't count) [this also happens with the clean ~/.config/WebCord].

I have the same problem on a fresh Arch Linux install (using the official rpm).

You mean Fedora? Arch got webcord or webcord-* packages, where webcord-git is the only package maintained by me right now.

Also, does it reproduce only on the reboot or when app is restarted (not hidden to the tray)?

GribouilleVert commented 2 years ago

Also, does it reproduce only on the reboot or when app is restarted (not hidden to the tray)?

I've tried to qui it from the tray and then launch it again, and i'm still connected. However when my gmd session stops/crashes (aka. when i logout from my computer) and then log-back in without rebooting, webcord logs me out the same.

SpacingBat3 commented 1 year ago

I wonder if and how the auth token is stored differently from the rest.

As of that, it's not stored differently from anything, AFAIK Discord stores all data in the localStorage. And as long this is a thing:

I've tried to qui[t] it from the tray and then launch it again, and i'm still connected. (...)

…I don't think this is a bug with the Electron. I would suspect something's messed up once the logout or login occurs. I definitely can't fix it myself if WebCord works fine after it is being relaunched. I can't also reproduce this issue at all.

AuraHerreroRuiz commented 1 year ago

I also saw this issue (using the AUR package webcord), but maybe it's an issue with your .config getting messed up? I just moved ~/.config/Webcord elsewhere (so the app can recreate the config folder) and the issue went away for me.

I can confirm deleting my ~/.config/Webcord folder made the issue dissappear for me as well. I'm also using the same AUR package webcord.

SpacingBat3 commented 7 months ago

Reopening the issue ticket since it seems that this has never been fixed...

sqrt-7 commented 7 months ago

I'm having the same issue on Arch (aur/webcord). Deleted ~/.config/Webcord but it didn't help, still getting logged out on every restart.