SpacingBat3 / WebCord

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

Webcord does not stay logged in on reboot #501

Closed Spamakin closed 4 months ago

Spamakin commented 6 months ago

Acknowledgements

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

v28.1.0

Application version

v4.6.0

Bug description

Every time I start my laptop, I have to login into my Discord account again. If I fully close the app and open it, this does not occur. It is only on startup.

As for the About window not working, it is even more strange. If I click about, Webcord closes the window (not fully shutting down the app) and reopens itself. Then the About window is there but completely greyed out. If I click on the About window, it flashes briefly. I cannot close out of the About window and also if I try to click away from Webcord, Webcord shoves itself to the top of the screen as the current application. If I close the window and reopen Webcord (not fully shutting down the app) Webcord works as normal.

Should I submit the above About bug as a separate issue?

Additional context

I can just temporarily login and the rest of the app works fine. I am specifically on Kubuntu and using KDE if that makes a difference for this.

SpacingBat3 commented 6 months ago

Should I submit the above About bug as a separate issue?

This was already submitted

Every time I start my laptop, I have to login into my Discord account again. If I fully close the app and open it, this does not occur. It is only on startup.

I've got reports like this in the past, but I was never able to reliably reproduce this in any way. I honestly would suspect this is an issue somehow associated with your current Linux setup than a problem with my app. At worst, this is yet another Electron bug.

Also, what builds were you using? Flatpaks, Snaps, DEBs, AppImage? I guess what could matter is whenever WebCord data is sandboxed or not and how sandboxing works.

Spamakin commented 6 months ago

I was using v4.6.0 and am now using v4.6.1, both with the amd64 debian file.

Now that I can access about, Electron is running v28.1.0

4lrick commented 4 months ago

Maybe it's related to the DevTools?

I had the same problem with Vesktop and the NoDevtoolsWarning plugin fixed it.

Related Vesktop issue

SpacingBat3 commented 4 months ago

Maybe it's related to the DevTools?

More precisely:

(...) As a side effect, it also prevents Discord from hiding your token, which prevents random logouts.

DevTools should have nothing to be doing with it, I suppose Discord hides the token to prevent to access is from the DevTools, but it might as well be a good protection for any kind of the code that isn't running in the separate context and has access to the Discord page. Blocking that definitely harms the security, I don't think I want that (in the past I had plans to leak the token only to the authorized third-party mods).


But again, nothing changed within this context:

I've got reports like this in the past, but I was never able to reliably reproduce this in any way.

I've never encountered a logout just right after a reboot, at worst WebCord would launch in another session (I should say right now WebCord is designed around running in the single session and always runs a code to detect whenever another session is running of it, so that seems like a bug with Electron) but it doesn't affect the 1st instance in any way, meaning no logout should occur in such scenario.

SpacingBat3 commented 4 months ago

Until I will reproduce this, I'm afraid I won't do anything to resolve this (since I don't know what is broken).

Also since there was https://github.com/SpacingBat3/WebCord/issues/245 in the past, I'll probably just close this. That issue has some talk about this, and I've also didn't resolve it back then so I suspect this issue ticket is just a duplicate.