Jellyfin connector: every theme upload fails with "database table is locked: theme_ownership"

Aperta
#706 2 commenti 1 reazione 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ReenigneArcher ci sta già lavorando.

Dal 11/11/2026.

  • #716 di @ReenigneArcher — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, docker, sqlite
Ambito
backend, database

Direzione di ricerca

Start with connectors/jellyfin/ThemeOwnership.cs and trace how Record() holds its transaction while the writeTheme callback reaches ThemeFiles.State() and Find(); then inspect the related ThemeFiles.Save() flow. Reproduce an upload against Jellyfin 10.11.11 and check the connector logs. Done means uploads write the theme file and record ownership without the SQLite table lock error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the Bug

Every theme upload to Jellyfin fails. Plex uploads from the same Themerr instance work.

  • Themerr: lizardbyte/themerr:v2026.1108.23838 (Docker)
  • Themerr Connector: 2026.1108.238.38, installed from Themerr's own repository
  • Jellyfin: 10.11.11 (Docker, Linux)

Jellyfin log, on every upload (106 of 106 attempts so far):

[ERR] Themerr.Connector.Controller: Could not access connector theme storage.
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked: theme_ownership'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   ...
   at Themerr.Connector.ThemeOwnership.Find(Guid itemId)
   at Themerr.Connector.ThemeFiles.State(Guid itemId, String root, Int32 themeSongCount)
   at Themerr.Connector.ThemeFiles.<>c__DisplayClass9_0.<Save>b__0()
   at Themerr.Connector.ThemeOwnership.Record(Guid itemId, String file, String digest, Action writeTheme)
   at Themerr.Connector.ThemeFiles.Save(...)
   at Themerr.Connector.Controller.Upload(Guid itemId, CancellationToken cancellationToken)

Themerr records these items as "Jellyfin could not complete this request." No theme file is written.

The stack points at connectors/jellyfin/ThemeOwnership.cs: Record() opens a read-write context, begins a transaction and calls SaveChanges(), then runs the writeTheme callback before committing. That callback calls ThemeFiles.State() → ThemeOwnership.Find(), which opens a second connection and reads theme_ownership while the first connection still holds the uncommitted write. The code is the same on master.

Expected Behavior

The upload writes the theme file, and ownership is recorded.

Additional Context

Possible fixes: compute the state before Record() opens its transaction, or have the callback reuse Record()'s context instead of opening a new connection.

Library folders are writable by Jellyfin. The connector installs and loads normally, and Themerr's scan finds the Jellyfin items without the "deferred" warning.

Lingua principale
Python
Stelle
97
Fork
7
Merge medio
16h 30m
PR unite (30g)
71

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LizardByte/Themerr

Tutte le issue di LizardByte/Themerr

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.