Need help - scan job stops

Hello,
my library scanning always stops. The issue seems to be within a photo folder, but I am not sure. This bis what I found in the logs. Can somebody help me how to debug further?

[2021-01-17 16:50:47.658 +00:00] [ERR] [118] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error
Constraint: SQLitePCL.pretty.SQLiteException: NOT NULL constraint failed: ItemValues.Type
   at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg)
   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
   at SQLitePCL.pretty.StatementImpl.MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.InsertItemValues(Byte[] idBlob, List`1 values, IDatabaseConnection db)
   at Emby.Server.Implementations.Data.SqliteItemRepository.UpdateItemValues(Guid itemId, List`1 values, IDatabaseConnection db)
   at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, IEnumerable`1 tuples)
   at SQLitePCL.pretty.DatabaseConnection.<>c__DisplayClass20_0.<RunInTransaction>b__0(IDatabaseConnection db)
   at SQLitePCL.pretty.DatabaseConnection.RunInTransaction[T](IDatabaseConnection This, Func`2 f, TransactionMode mode)
   at SQLitePCL.pretty.DatabaseConnection.RunInTransaction(IDatabaseConnection This, Action`1 action, TransactionMode mode)
   at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(IEnumerable`1 items, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.LibraryManager.UpdateItems(IEnumerable`1 items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.LibraryManager.UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.BaseItem.UpdateToRepository(ItemUpdateType updateReason, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.SaveItem(MetadataResult`1 result, LibraryOptions libraryOptions, ItemUpdateType reason, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshMetadataRecursive(List`1 children, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshMetadataRecursive(List`1 children, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshMetadataRecursive(List`1 children, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
   at MediaBrowser.Controller.Entities.AggregateFolder.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)
[2021-01-17 16:50:47.670 +00:00] [INF] [118] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Scanne alle Bibliotheken" Failed after 0 minute(s) and 54 seconds

This is the one with the critical photo path - at least where it is mentioned in the prior line:

[2021-01-17 12:21:54.704 +00:00] [INF] [81] Emby.Server.Implementations.IO.LibraryMonitor: Watching directory /media/Bilder/0001 - Kita Elia
[2021-01-17 12:21:54.708 +00:00] [ERR] [90] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error
Constraint: SQLitePCL.pretty.SQLiteException: NOT NULL constraint failed: ItemValues.Type
  at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg)
  at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
  at SQLitePCL.pretty.StatementImpl.MoveNext()
  at Emby.Server.Implementations.Data.SqliteItemRepository.InsertItemValues(Byte[] idBlob, List`1 values, IDatabaseConnection db)
  at Emby.Server.Implementations.Data.SqliteItemRepository.UpdateItemValues(Guid itemId, List`1 values, IDatabaseConnection db)
  at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, IEnumerable`1 tuples)
  at SQLitePCL.pretty.DatabaseConnection.<>c__DisplayClass20_0.<RunInTransaction>b__0(IDatabaseConnection db)
  at SQLitePCL.pretty.DatabaseConnection.RunInTransaction[T](IDatabaseConnection This, Func`2 f, TransactionMode mode)
  at SQLitePCL.pretty.DatabaseConnection.RunInTransaction(IDatabaseConnection This, Action`1 action, TransactionMode mode)
  at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(IEnumerable`1 items, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.UpdateItems(IEnumerable`1 items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.BaseItem.UpdateToRepository(ItemUpdateType updateReason, CancellationToken cancellationToken)
  at MediaBrowser.Providers.Manager.MetadataService`2.SaveItem(MetadataResult`1 result, LibraryOptions libraryOptions, ItemUpdateType reason, CancellationToken cancellationToken)
  at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.RefreshMetadataRecursive(List`1 children, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.RefreshMetadataRecursive(List`1 children, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.RefreshMetadataRecursive(List`1 children, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
  at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
  at MediaBrowser.Controller.Entities.AggregateFolder.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)
[2021-01-17 12:21:54.727 +00:00] [INF] [90] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Scanne alle Bibliotheken" Failed after 2 minute(s) and 14 seconds

I checked the photos with “jpeginfo -c” - none of them throws anything else than “[OK]” :-(…

Has this library ever been able to scan successfully or is this a new issue? Have you tried to recreate the library and see if it continues to happen?

The library with the photos never was scanned properly. When I remove the photos folder, the rest doesnt show an error message in the UI that the scan failed.
And yes, I recreated the library multiple times by deleting it and adding it. I didnt want to wipe everything to not lose history of watched episodes and movies.
Not sure if the issue is based on the fact that the media folders are read only…
What I noticed is: for at least one folder with photos the thumbnails are not generated and stay “empty”.
Not sure if this matters - when doing the same with Emby (I simply tried), the thumbnails are not cached and generate each time again in a very slow manner… So I assume something is wrong on the file side?