-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shokofin 4 Plugin throws unhandled exception #61
Comments
|
You might need to enable trace logging for it to show up in the log file, but it should be visible in the docker log if you use docker. |
sry i didnt actively assign reviewers, was probably something in the submission form that did that tnx for suggestions, will update jellyfin and search deeper in docker logs |
updated jellyfin to 10.9.7, problem persists. found stacktrace in shoko server log:
|
It was meant to fix other problems, not this problem.
It seems you have some invalid file locations in your database. Run the action to clean up missing files in the web ui or shoko desktop. |
Feel free to reopen this issue if running the action (and making sure it completes) followed by a new scan/refresh doesn't fix the issue. |
It seems that didn't fix it. Will need to investigate how to properly fix it for the current stable server, but the issue seems to be that the server have some file locations without a valid file entry, so it errs out when trying to read the creation date on a null reference file, since it was unable to look up the file entry for the file location. |
Maybe superfluous at this point but wanted to do some more experiments before getting back to this, can however confirm that running the task did not fix the problem. Is there a good way to search for, and rectify these possible entries manually via ShokoDesktop or some other way in the meantime? |
I'll see if i can write some SQL tomorrow to fix a) identify if the error is what i think it is, and b) fix it. (so two SQL statements) @exorsize do you know how to run SQL on a SQLite 3 database file or will you need instructions for how to run the SQL statements? |
The statements will suffice |
@ElementalCrisis it's a bug in Shoko Server, not in the plugin itself. |
First the check to make sure this is the actual issue; SELECT COUNT(*) FROM VideoLocal_Place vlp WHERE NOT EXISTS (SELECT 1 FROM VideoLocal vl WHERE vlp.VideoLocalID = vl.VideoLocalID); If the count is above zero then there is an easy way to let Shoko Server fix the issue, instead of trying manually editing the database; Just press the "scan" icon on all the import folders with files in them and let it settle. @exorsize can you post the output of the above SQL when ran against your database? |
The count was above zero, returned 8. Thank you for the help. |
Jellyfin version.
10.9.1
Shokofin version.
4.0.0.0
Shoko Server version, release channel, and commit hash.
4.2.2 stable
File structure of your Media Library Folder in Jellyfin/Import Folder in Shoko Server.
../anime/Anime A/Season A/Episode.mkv
Screenshot of the "library settings" section of the plugin settings.
Library Type(s).
Shows
Do the issue persists after creating a library with Shoko set as the only metadata provider? (Now is your time to check if you haven't already.)
Issue
In trying to use the new 4.0 release of shokofin but it throws an exception.
I removed the old v3 plugin and the old library built with version 3, rebooted jellyfin and then tried to add back a new library.
Stack Trace
from shokoserver log:
shokoserver | 16:34:09| SentryMiddleware --- Sending event 'Sentry.SentryEvent' to Sentry.
shokoserver | 16:34:09| SentryMiddleware --- Event '00000000000000000000000000000000' queued.
shokoserver | 16:34:09| Kestrel --- Connection id "0HN4T16NPFC0I", Request id "0HN4T16NPFC0I:00000004": An unhandled exception was thrown by the application.
from jellyfin.log:
[2024-07-05 18:34:09.909 +02:00] [ERR] Threw unexpectedly; "InternalServerErrorException"
Shokofin.API.Models.ApiException: InternalServerErrorException
at Shokofin.API.ShokoAPIClient.Get[ReturnType](String url, HttpMethod method, String apiKey, Boolean skipCache)
at Shokofin.API.ShokoAPIClient.GetFilesForImportFolder(Int32 importFolderId, String subPath, Int32 page)
at Shokofin.Resolvers.VirtualFileSystemService.GetFilesForImportFolder(IReadOnlyList
1 mediaConfigs, HashSet
1 fileSet)+MoveNext()at System.Linq.Enumerable.SelectEnumerableIterator
2.MoveNext() at System.Threading.Tasks.Task.WhenAll(IEnumerable
1 tasks)at Shokofin.Resolvers.VirtualFileSystemService.GenerateStructure(Nullable
1 collectionType, String vfsPath, IEnumerable
1 allFiles)at Shokofin.Resolvers.VirtualFileSystemService.<>c__DisplayClass16_0.<b__2>d.MoveNext()
--- End of stack trace from previous location ---
at Shokofin.Utils.GuardedMemoryCache.GetOrCreateAsync[TItem](Object key, Func
1 createFactory, MemoryCacheEntryOptions createOptions) at Shokofin.Resolvers.VirtualFileSystemService.GenerateStructureInVFS(Folder mediaFolder, String path) at Shokofin.Resolvers.ShokoResolver.ResolveMultiple(Folder parent, Nullable
1 collectionType, List1 fileInfoList) [2024-07-05 18:34:09.911 +02:00] [ERR] Error retrieving children folder Shokofin.API.Models.ApiException: InternalServerErrorException at Shokofin.API.ShokoAPIClient.Get[ReturnType](String url, HttpMethod method, String apiKey, Boolean skipCache) at Shokofin.API.ShokoAPIClient.GetFilesForImportFolder(Int32 importFolderId, String subPath, Int32 page) at Shokofin.Resolvers.VirtualFileSystemService.GetFilesForImportFolder(IReadOnlyList
1 mediaConfigs, HashSet1 fileSet)+MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator
2.MoveNext()at System.Threading.Tasks.Task.WhenAll(IEnumerable
1 tasks) at Shokofin.Resolvers.VirtualFileSystemService.GenerateStructure(Nullable
1 collectionType, String vfsPath, IEnumerable1 allFiles) at Shokofin.Resolvers.VirtualFileSystemService.<>c__DisplayClass16_0.<<GenerateStructureInVFS>b__2>d.MoveNext() --- End of stack trace from previous location --- at Shokofin.Utils.GuardedMemoryCache.GetOrCreateAsync[TItem](Object key, Func
1 createFactory, MemoryCacheEntryOptions createOptions)at Shokofin.Resolvers.VirtualFileSystemService.GenerateStructureInVFS(Folder mediaFolder, String path)
at Shokofin.Resolvers.ShokoResolver.ResolveMultiple(Folder parent, Nullable
1 collectionType, List
1 fileInfoList)at Shokofin.Resolvers.ShokoResolver.MediaBrowser.Controller.Resolvers.IMultiItemResolver.ResolveMultiple(Folder parent, List
1 files, Nullable
1 collectionType, IDirectoryService directoryService)at Emby.Server.Implementations.Library.LibraryManager.ResolvePaths(IEnumerable
1 files, IDirectoryService directoryService, Folder parent, LibraryOptions libraryOptions, Nullable
1 collectionType, IItemResolver[] resolvers)at MediaBrowser.Controller.Entities.Folder.GetNonCachedChildren(IDirectoryService directoryService)
at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
The text was updated successfully, but these errors were encountered: