jellyfin / jellyfin-media-player

Jellyfin Desktop Client
GNU General Public License v2.0
2.87k stars 297 forks source link

Can't change login upon failure to authentificate #669

Closed HamletDuFromage closed 1 month ago

HamletDuFromage commented 1 month ago

Describe the bug When an expired token is stored in the client, the window displays an uninteractive grey screen

To Reproduce

Expected behavior It should kick you back to the login screen

Screenshots image

Desktop (please complete the following information):

Additional context jellyfin logs:

[2024-05-28 00:46:09.790 +02:00] [INF] [69] Jellyfin.Api.Auth.CustomAuthenticationHandler: "CustomAuthentication" was not authenticated. Failure message: "Invalid token."
[2024-05-28 00:46:09.791 +02:00] [ERR] [69] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Invalid token". URL "GET" "/socket".
[2024-05-28 00:46:13.384 +02:00] [INF] [26] Jellyfin.Api.Auth.CustomAuthenticationHandler: "CustomAuthentication" was not authenticated. Failure message: "Invalid token."
[2024-05-28 00:46:13.385 +02:00] [ERR] [26] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Invalid token". URL "GET" "/socket".
[2024-05-28 00:46:19.570 +02:00] [INF] [69] Jellyfin.Api.Auth.CustomAuthenticationHandler: "CustomAuthentication" was not authenticated. Failure message: "Invalid token."
[2024-05-28 00:46:19.571 +02:00] [ERR] [69] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Invalid token". URL "GET" "/socket".

JMP logs:

2024-05-28 00:46:19.492 [info] unknown @ 0 - JS: opening web socket with url: wss://jellyfin.my.server/socket?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&deviceId=SmVsbHlmaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2024-05-28 00:46:19.590 [info] unknown @ 0 - JS: WebSocket connection to 'wss://jellyfin.my.server/socket?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&deviceId=SmVsbHlmaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' failed: Error during WebSocket handshake: Unexpected response code: 403
2024-05-28 00:46:19.590 [info] unknown @ 0 - JS: Clearing KeepAlive for [object WebSocket]
2024-05-28 00:46:19.590 [info] unknown @ 0 - JS: web socket closed
2024-05-28 00:46:19.590 [info] unknown @ 0 - JS: Clearing KeepAlive for [object WebSocket]
2024-05-28 00:46:19.590 [info] unknown @ 0 - JS: nulling out web socket

The debuggers logs show it's trying to connect using this cookie: {"Servers":[{"ManualAddress":"https://mydomain.com/jellyfin","Id":"randomstingoflettersnumbers","UserId":"randomstingoflettersnumbers","AccessToken":"randomstingoflettersnumbers"}]} but I'm unable to find where it is to delete it. Uninstalling and reinstalling doesn't clear it. Installing it on another filesystem (flatpak) lets me connect to the server, until I delete the device in the dashboard

HamletDuFromage commented 1 month ago

welp nvm, I was able to login by deleting ~/.local/share/Jellyfin Media Player/QtWebEngine/, following https://github.com/jellyfin/jellyfin-media-player/issues/624#issuecomment-2125966584 's advice. I couldn't find this directory documented anywhere though, not sure if it's AUR specific or what. Still, an interactive way to delete the cache might be a good add.