jellyfin / jellyfin-media-player

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

Jellyfin needs cache invalidated #688

Open fatexs opened 3 weeks ago

fatexs commented 3 weeks ago

Since the Jellyfin Player relies on external jellyfin-web the web data seems to be cached.

If the server is not updated this is not an issue. However if the server is updated the interface breaks is various ways.

In the jellyfin player under overview->Server it still shows the old web-Version (in my case 10.9.3) even though jellyfin-server was updated to 10.9.6 and jellyfin-web also on 10.9.6. (I confirmed that via Firefox)

Connecting works fine but playback is broken, no video plays, only audio. Then the player completely freezes. Server works fine on all other players (androidtv, android, firefox webinterface)

The fix is to delete: C:\Users\user\AppData\Local\JellyfinMediaPlayer and C:\Users\user\AppData\Local\Jellyfin Media Player

My guess is JF Client does never validate if cache data is still valid to use.

To Reproduce Steps to reproduce the behavior:

  1. run server in old Version
  2. Connect with JF client external
  3. Upgrade Server
  4. Reconnect with client
  5. Interface broken (no video, only audio plays)

Expected behavior Working interface

Desktop (please complete the following information):

fatexs commented 3 weeks ago

Jellyfin log after clearing %appdata% . JellyfinMediaPlayer.log

gummykage commented 3 weeks ago

Great workaround! Definitely a bug I've been struggling with thank you for finding it.

fatexs commented 6 days ago

Related: https://github.com/jellyfin/jellyfin-web/issues/5729 Probably related: https://github.com/jellyfin/jellyfin-media-player/issues/694

gerben838665 commented 5 days ago

Ran into this issue today. After I updated my server to 10.9.7 the interface in jellyfin-media-player broke. Making it impossible to open anything from the homepage. Curiously starting playback still worked from the homepage through "Next Up" for example.

Deleting "%LOCALAPPDATA%\Jellyfin Media Player" fixed the issue.

Attached below log files from before and after deleting the above folder. JellyfinMediaPlayer before.log JellyfinMediaPlayer after.log

Only things I notice in the log files is a ChunkLoad error in the before. And that the before thinks i'm running jellyfin-web version 10.9.6 instead of 10.9.7

Doxterpepper commented 3 days ago

Related: jellyfin/jellyfin-web#5729 Probably related: #694 Yeah, this has to be an issue with the HTTP cache. When you delete app data, it should delete the cache forcing the application to make the request to the server instead of using cache.

I'm guessing the fix here would be the same in jellyfin-web, either don't use the cache when calling the /system/info API, or do a conditional request to see if the value has changed before using the cache.