Jellyfin connector: every theme upload fails with "database table is locked: theme_ownership"
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 97
- Forks
- 7
- Avg merge
- 16h 30m
- Merged PRs (30d)
- 71
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LizardByte/Themerr
-
Dependency DashboardMay be free again @LizardByte-bot claimed this 213 days ago, and no pull request is open. Opendependencies
LizardByte/Themerr#557 · 1 assignee ·
Maintainers usually reply within 1 day
-
Top Issues DashboardMay be free again @LizardByte-bot claimed this 216 days ago, and no pull request is open. Open:star: top issues dashboard
LizardByte/Themerr#551 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in LizardByte/Themerr
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
openvinotoolkit/openvino_notebooks#3858 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
hummingbot/hummingbot-api#256 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
area:other help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
WingedGuardian/GENesis-AGI#4734 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
peach-mitao/peach#693 ·
Maintainers usually reply within 1 day