Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Jellyfin Chromecast selection never appears

I had a problem with my production Jellyfin server a few days ago.

User "jellyfin" was unable to pull up the menu of available Chromecast targets, so Chromecast was entirely unavailable. Also, new logins for the user would not always go through. The server logs showed:

[2022-09-19 09:09:10.415 +00:00] [INF] [43] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "258.1.15.15" request
[2022-09-19 09:09:10.526 +00:00] [ERR] [13] Microsoft.EntityFrameworkCore.Query: An exception occurred while iterating over the results of a query for context type '"Jellyfin.Server.Implementations.JellyfinDb"'."
""System.InvalidOperationException: The data is NULL at ordinal 5. This method can't be called on NULL values. Check using IsDBNull before calling.

A search of the Internet and more specifically github jellyfin showed a promising suggestion:

sbstp commented on Aug 7, 2021 @sweisgerber I actually found a better fix, this issue came back for me. The fix was to go into jellyfin.db with sqlite3 (command line) or sqlitebrowser (gui) and delete the rows of CustomItemDisplayPreferences where value is null. Make sure to backup the db before doing that just in case.

DELETE FROM CustomItemDisplayPreferences WHERE Value IS NULL;

Somehow the settings in the database table got corrupted. This is probably a failure of the application logic and not something done by a user. But it's something I can live with! Thankfully there are smarter people on the Internet who experienced this before I did.

Comments