Jellyfin Forum
Strange Jellyfin behaviour around new media/metadata? - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Media Scanning & Identification (https://forum.jellyfin.org/f-media-scanning-identification)
+---- Thread: Strange Jellyfin behaviour around new media/metadata? (/t-strange-jellyfin-behaviour-around-new-media-metadata)



Strange Jellyfin behaviour around new media/metadata? - QuantumDelta - 2024-12-05

Hi all,

I did a bit of googling around I've been looking through the logs I'm hoping this snippet might be enough to encapsulate the issue, if not I'll edit a full log remitting users and stuff.

This happens when attempting to access the meta data information for any media at all.
From a user perspective you get the meta data screen pop up but it's unpopulated and just a whirling circle.

Code:
[2024-12-05 10:45:35.459 +00:00] [ERR] Error processing request. URL "GET" "/Items/7ced95f9c2132bb1e1c01fb19f363156/MetadataEditor".
System.NullReferenceException: Object reference not set to an instance of an object.
  at Emby.Server.Implementations.IO.ManagedFileSystem.AreEqual(String path1, String path2)
  at Emby.Server.Implementations.Library.LibraryManager.<>c__DisplayClass159_0.<GetContentTypeOverride>b__0(NameValuePair i)
  at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
  at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
  at Emby.Server.Implementations.Library.LibraryManager.GetContentTypeOverride(String path, Boolean inherit)
  at Emby.Server.Implementations.Library.LibraryManager.GetConfiguredContentType(BaseItem item, Boolean inheritConfiguredPath)
  at Emby.Server.Implementations.Library.LibraryManager.GetConfiguredContentType(BaseItem item)
  at Jellyfin.Api.Controllers.ItemUpdateController.GetMetadataEditorInfo(Guid itemId)
  at lambda_method1160(Closure, Object, Object[])
  at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
  at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
  at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
  at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
  at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
  at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
  at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
  at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
  at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
  at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
  at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
  at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
  at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
  at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
  at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
  at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
  at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
  at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

This may be a symptom of a larger problem, because adding new media to the jellyfin instance also seems to have stopped working.
...Sort of.

Files appear to be visible in the metadata section, but in the actual library for the season they don't show up, nor is there any indication they're present from the series folder or library folder, yet in 'meta data' they appear present, with names that the files don't even have(japanese.. I can't read it sadly, but based on the fact the filenames are all in english I assume it's pulled data for the show from ....somewhere? but can't apply it anywhere?).

It feels like a weird one.

Worth noting I'm on 10.9.11 but haven't wanted to update because of this, if it's a wider write..? issue because;
Code:
System.UnauthorizedAccessException: Access to the path '/mnt/media/Anime/Sword Art Online/Season 2/season.nfo' is denied.
---> System.IO.IOException: Permission denied
  --- End of inner exception stack trace ---
  at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
  at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
  at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
  at System.IO.FileStream..ctor(String path, FileStreamOptions options)
  at MediaBrowser.XbmcMetadata.Savers.BaseNfoSaver.SaveToFileAsync(Stream stream, String path)
  at MediaBrowser.XbmcMetadata.Savers.BaseNfoSaver.SaveAsync(BaseItem item, CancellationToken cancellationToken)
  at MediaBrowser.Providers.Manager.ProviderManager.SaveMetadataAsync(BaseItem item, ItemUpdateType updateType, IEnumerable`1 savers)

Is all over the logs. Despite even chmod 777

This was previously working fine, I'm not 100% sure when/how it broke, I'm not a linux guru by any means, so any guidance or advice would be most helpful and much appreciated!

Cheers,
QD


RE: Strange Jellyfin behaviour around new media/metadata? - TheDreadPirate - 2024-12-05

Is this a direct linux install? Or a docker install? Is this path a local hard drive or a network share?

Copy and paste this command and share the output.

Code:
ls -ld /mnt /mnt/media /mnt/media/Anime /mnt/media/Anime/Sword\ Art\ Online /mnt/media/Anime/Sword\ Art\ Online/Season\ 2



RE: Strange Jellyfin behaviour around new media/metadata? - QuantumDelta - 2024-12-05

Hi! Thanks for the reply, and apologies for my slow reply it's proxmox -> proxmox helper scripts (so direct linux vm I guess?)
I think this is a network share as far as jellyfin is concerned, but it is a drive that's local to the proxmox host.
It's been a while since I set it up and I haven't tinkered enough for my memory to have retained all I've done with it.. apologies!

For the record the no-access-to-metadata edit is jellyfin wide, while the error message about the SAO folders as an example is only in regards to a few series.

The output from that command is;
Code:
drwxrwxrwx  4 root  root    4 Jun 18 01:10  /mnt
drwxrwxrwx 11 root  root  13 Nov 28 10:49  /mnt/media
drwxrwxr-x 60 100100 100101 60 Dec  4 01:01  /mnt/media/Anime
drwxrwxrwx  7 100000 100000 18 Jun 25 12:14 '/mnt/media/Anime/Sword Art Online'
drwxrwxr-x  2 100100 100101 26 Jun 26 16:54 '/mnt/media/Anime/Sword Art Online/Season 2'



RE: Strange Jellyfin behaviour around new media/metadata? - TheDreadPirate - 2024-12-05

How did you mount this network share? If /etc/fstab, what are the mount parameters?


RE: Strange Jellyfin behaviour around new media/metadata? - QuantumDelta - 2024-12-05

#//xxx.xxx.xxx.xxx/public /mnt cifs auto,_netdev,guest,iocharset=utf8,noperm

This is the fstab output; pretty sure this is right...

So, that IP address was correct, I attempted to mount it this way but had issues..
from jellyfin I can actually cd into mnt/media/Anime or what have you that is the jellyfin library -- which is part of the samba storage I've set up, but I'm not sure if it's just accessing it locally rather than over a network share now. Apologies for the confusion


RE: Strange Jellyfin behaviour around new media/metadata? - TheDreadPirate - 2024-12-05

The "guest" option. That makes the mount read only. And it looks like you are using NFO saver and, I'm assuming, you're trying to save images with your media. You need to provide credentials for a user with read/write permissions. Also, what is with the # at the beginning? Is it commented out?

Also, LAN IPs are not publicly routable. You don't need to censor it.

Code:
#//xxx.xxx.xxx.xxx/public /mnt cifs auto,_netdev,credentials=/root/.smbcredential,siocharset=utf8,noperm

And .smbcredentials would look like this.

Code:
user=myUser
password=pass
domain=WORKGROUP

And, to be clear, the credentials you put in this file are valid credentials on the host serving the network share.


RE: Strange Jellyfin behaviour around new media/metadata? - QuantumDelta - 2024-12-05

Forgive me, does the # not meant it's commented out?
Additionally, I'm not 100% sure it's because of the 'guest' creds; it's been able to write to things just fine for months, and all the other places that access that file share are also effectively using that 'guest' access, they're writing to it fine as well.

I'm quite confused at this point and I know it's entirely my own fault and not yours or jellyfins :P
For .smbcredentials; is that to go in the /etc/ folder?
...This is going to break everything else that has access currently and is writing to it isn't it..? gonna have to work out some of that config too oh boy


RE: Strange Jellyfin behaviour around new media/metadata? - TheDreadPirate - 2024-12-05

.smbcredentials can go anywhere.  You provide the path in fstab.  In my example I put it in root's home.

And, yes, # means it is commented out.  So I question whether in your setup the SMB share is mounted with fstab at the moment.

(2024-12-05, 07:04 PM)QuantumDelta Wrote: #//xxx.xxx.xxx.xxx/public        /mnt            cifs    auto,_netdev,guest,iocharset=utf8,noperm