Jump to content

After update: Scan media library failed


Recommended Posts

Posted

Hello. I have been using Emby a long time now.

But after the latest update i got a problem, it's not scanning my folders.
And the task fails.

And no files (nfo etc) is getting created.

Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
at SQLitePCL.pretty.StatementImpl.MoveNext()
at Emby.Server.Implementations.Data.SqliteItemRepository.GetUserDataKeyId(String userDataKey, IStatement insertUserDataKeyStatement, IStatement getUserDataKeyStatement)
at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, List`1 tuples)
at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, Action`1 afterSave, CancellationToken cancellationToken)
at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, CancellationToken cancellationToken)
at Emby.Server.Implementations.Library.LibraryManager.CreateItems(List`1 items, BaseItem parent, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
at MediaBrowser.Controller.Entities.Folder.ValidateSubFolders(BaseItem[] children, IDirectoryService directoryService, IProgress`1 progress, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
at MediaBrowser.Controller.Entities.Folder.ValidateSubFolders(BaseItem[] children, IDirectoryService directoryService, IProgress`1 progress, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
at MediaBrowser.Controller.Entities.Folder.ValidateSubFolders(BaseItem[] children, IDirectoryService directoryService, IProgress`1 progress, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
at MediaBrowser.Controller.Entities.Folder.ValidateSubFolders(BaseItem[] children, IDirectoryService directoryService, IProgress`1 progress, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
at Emby.Server.Implementations.Library.LibraryManager.PerformLibraryValidation(IProgress`1 progress, CancellationToken cancellationToken)
at Emby.Server.Implementations.Library.LibraryManager.ValidateMediaLibraryInternal(IProgress`1 progress, CancellationToken cancellationToken)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

 

Posted

That seems very complicated.

Is it possible to just delete the two files (after shutting down emby) or do i need to do all the other things too?

This step: Delete library.db-shm & library.db-wal

 

What does this mean:
Change to the database location found above containing your database files

Posted (edited)

Or should i only try to:
Rename library.db to library.corrupt

?

Edited by Ametz
Posted
1 hour ago, Ametz said:

That seems very complicated.

Is it possible to just delete the two files (after shutting down emby) or do i need to do all the other things too?

This step: Delete library.db-shm & library.db-wal

Yes that's what we want you to try first before doing anything else.

@cayars can improve the instructions if that's not clear already.

Carlo
Posted
2 hours ago, Ametz said:

That seems very complicated.

Is it possible to just delete the two files (after shutting down emby) or do i need to do all the other things too?

This step: Delete library.db-shm & library.db-wal

 

What does this mean:
Change to the database location found above containing your database files

Is it really complicated?  2/3 of the article just show you how to find the location where library.db is stored. It's different depending on OS running your Server or if you have a portable install.  If you already know where library.db is then you try removing the locks which is:
 

Remove Database Locks

1. Shutdown Emby
2. Change to the database location found above containing your database files
3. Delete library.db-shm & library.db-wal
4. Restart Emby
Check you server log for SQLite errors and only continue to the next step if needed

Happy2Play
Posted

@cayarspossibly change step 2 to 

Navigate to the folder containing your database file.

  • Thanks 1
Posted

Seems like it worked, thanks

  • Like 1
Carlo
Posted

Great, thanks for the update!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...