tubearchivist / tubearchivist-jf-plugin

Metadata for your TubeArchivist library on Jellyfin.
GNU General Public License v3.0
65 stars 4 forks source link

[Bug]: SQLite Error 5: 'database is locked'. #11

Open HarryFreeMyLand opened 1 month ago

HarryFreeMyLand commented 1 month ago

I've read the documentation

Operating System

Linux (TrueNAS k3s)

Your Bug Report

Describe the bug

I can't seem to get the 1.3.0.0 version of this plug working with Jellyfin 10.9.1

I've created a new instance of Jellyfin, new database (my old one got corrupted during the migration to 10.9.1, so can't test that), installed the plugin, verified that it is able to connect to my Tube Archivist instance. but when trying to scan for metadata I get errors related to SQLite not being able to process a transaction.

Steps To Reproduce

create new instance of 10.9.1, install plugin 1.3.0.0, set parameters, create library, scan.

Expected behavior

Relevant Jellyfin log output

[12:14:59] [ERR] [42] MediaBrowser.Providers.Manager.ProviderManager: Error refreshing item
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
   at Microsoft.Data.Sqlite.SqliteConnectionExtensions.ExecuteNonQuery(SqliteConnection connection, String commandText, SqlitePar                                            ameter[] parameters)
   at Microsoft.Data.Sqlite.SqliteTransaction..ctor(SqliteConnection connection, IsolationLevel isolationLevel, Boolean deferred)
   at Microsoft.Data.Sqlite.SqliteConnection.BeginTransaction(IsolationLevel isolationLevel, Boolean deferred)
   at Microsoft.Data.Sqlite.SqliteConnection.BeginTransaction(IsolationLevel isolationLevel)
   at Microsoft.Data.Sqlite.SqliteConnection.BeginTransaction()
   at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(IReadOnlyList`1 items, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.LibraryManager.CreateItems(IReadOnlyList`1 items, BaseItem parent, CancellationToken ca                                            ncellationToken)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, Boolean recursive, Boolean refreshC                                            hildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationTok                                            en cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshCh                                            ildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToke                                            n cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass69_0`1.<<RunTasks>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken                                             cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, Boolean recursive, Boolean refreshC                                            hildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationTok                                            en cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshCh                                            ildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToke                                            n cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.RefreshCollectionFolderChildren(MetadataRefreshOptions options, CollectionFo                                            lder collectionFolder, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.RefreshItem(BaseItem item, MetadataRefreshOptions options, CancellationToken                                             cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.StartProcessingRefreshQueue()

Anything else?

No response

dscurrey commented 1 month ago

I'm also seeing this problem.

DarkFighterLuke commented 1 month ago

Hi, I was trying to reproduce the problem, but I don't get these errors on my instance logs. Does the problem persist?

HarryFreeMyLand commented 1 month ago

yes, just re-installed to verify that it still happens but... I still get the same thing on a fresh 10.9.3 and 1.3.0.0 combo.

DarkFighterLuke commented 1 month ago

Maybe it's something with TrueNAS, I don't have one so I can't test it, but I am pretty sure that is not related to the plugin, you should try on Jellyfin issues...

HarryFreeMyLand commented 3 weeks ago

Sorry about this, it was a permissions issue where the Jellyfin config directory for whatever reason needed 770 and not 750 permissions as were created by default.