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

Impossible to reconnect to Jellyfin without plugin reinstall after the server invalidated the token #338

Open
szotsaki opened this issue May 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@szotsaki
Copy link

Describe the bug

The server can invalidate the login token for many reasons: expiry, user remote logout, new version, password change, etc.

Jellycon, however, retries with the old token without the possibility to renew it.

To Reproduce

  1. Login to Jellyfin successfully in a way that Jellycon remembers the user/pass combo
  2. Change your password on the server or log out your other running sessions.
  3. Try to log in again which won't be successful

Expected behavior
Jellycon, after it realises that the login attempt was unsuccessful, revokes the invalid token and re-attempts to log in again without a token with the already provided auth data.

Logs

Jellyfin logs:

[INF] [19] Jellyfin.Api.Auth.CustomAuthenticationHandler: "CustomAuthentication" was not authenticated. Failure message: "Invalid token."
[ERR] [19] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Invalid token". URL "GET" "/socket".

What I see to happen is that in jellyfin.py#L130-L133 Jellycon loads the (now expired, invalid) token from auth.json and sends it to the server, the server rejects it, and Jellycon returns with an error.

As I see, the only way to remove this file is to uninstall the extension and reinstall it.

System (please complete the following information):

  • OS: Shield
  • Jellyfin Version: 10.9.2
  • Kodi Version: 21.0
  • Addon Version: 0.8.0
@szotsaki szotsaki added the bug Something isn't working label May 30, 2024
@Miwer
Copy link

Miwer commented Sep 30, 2024

Hi - I just ran into this bug also.
One workaround is to delete the auth.json file from the plugin data directory. After that I can login again and get a new token from the server.
File on my device is located in:
/storage/.kodi/userdata/addon_data/plugin.video.jellycon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants