• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting SOLVED: API Error processing requests for /emby/Sessions

     
    • 0 Vote(s) - 0 Average

    SOLVED: API Error processing requests for /emby/Sessions

    API request, Unable to cast object of type '<>z__ReadOnlyArray`1[MediaBrowser.Model.Session.GeneralCommandType]'
    kattolo
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2025 Mar
    Reputation: 0
    Country:Italy
    #1
    2025-03-17, 01:11 AM
    I am running Jellyfin 10.10.6 in a docker container, on Debian12 on RaspberryPi 5

    I have a self hosted gethomepage in another docker container that has Jellyfin as one of the services, and uses a native plugin to connect to my local Jellyfin server; it retrieves the necessary information, and presents them in the homepage (for example number of hosted movies, episodes, songs, and in case some user is viewing a movie details on what is being played)

    Up until a couple of days ago it was working properly, but after an OS update/upgrade and reboot, it is showing an API error instead of the Jellyfin information

    Code:
    API Error: HTTP Error
    URL: http://mylocal.domain:8096/emby/Sessions?api_key=***
    Response Data:
    "Error processing request."

    I attempted to connect via browser to other Jellyfin API URLs with different API keys and they all work properly, but all iterations of  http://mylocal.domain:8096/emby/Sessions?api_key=*** fail with an Error processing request

    The Jellyfin logs around the  timestamp of my attempts from browser are perfect matches to the many more instances of the same errors in the logs (supposedly the gethomepage Jellyfin Plugin attempts):

    Code:
    [2025-03-17 00:09:41.865 +00:00] [ERR] [28] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/Sessions".
    System.InvalidCastException: Unable to cast object of type '<>z__ReadOnlyArray`1[MediaBrowser.Model.Session.GeneralCommandType]' to type 'MediaBrowser.Model.Session.GeneralCommandType[]'.
      at System.Text.Json.JsonSerializer.UnboxOnWrite[T](Object value)
      at System.Text.Json.Serialization.JsonConverter`1.WriteAsObject(Utf8JsonWriter writer, Object value, JsonSerializerOptions options)
      at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
      at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
      at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
      at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
      at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
      at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
      at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
      at System.Text.Json.Serialization.Converters.ListOfTConverter`2.OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
      at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
      at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
      at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
      at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.SerializeAsync(Stream utf8Json, T rootValue, CancellationToken cancellationToken, Object rootValueBoxed)
      at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.SerializeAsync(Stream utf8Json, T rootValue, CancellationToken cancellationToken, Object rootValueBoxed)
      at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.SerializeAsync(Stream utf8Json, T rootValue, CancellationToken cancellationToken, Object rootValueBoxed)
      at Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
    --- 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 Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
      at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

    I seem to be unable to identify from the log the root cause of the issue, where could/should I look next?

    Thanks in advance for any help Smiling-face
    Go to solution
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2025-03-17, 02:29 AM
    Can you share your full jellyfin log via privatebin.net? AFAICT, that endpoint still works in 10.10.6.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    frostyslav
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2025 Mar
    Reputation: 0
    #3
    2025-03-17, 08:30 AM
    (2025-03-17, 02:29 AM)TheDreadPirate Wrote: Can you share your full jellyfin log via privatebin.net?  AFAICT, that endpoint still works in 10.10.6.

    I am not the original poster, but I have the same issue. Jellyfin 10.10.6 is running in Docker on TrueNAS (docker image jellyfin/jellyfin:10.10.6).

    This issue only started to appear in this version.
    Also it works for some time after container restart. Not sure if this is related, but this time it stopped working right after opening Jellyfin from LG WebOS app.

    https://privatebin.net/?72b5a70a94277b91...wvJCNWGdSA
    niels
    Offline

    Core Team

    Posts: 248
    Threads: 4
    Joined: 2023 Jun
    Reputation: 12
    Country:Netherlands
    #4
    2025-03-17, 09:58 AM
    If you have the Jellyfin DLNA plugin installed make sure it is NOT at version 7. Version 6 or 8 are fine.
    [Image: GitHub%20Sponsors-grey?logo=github]
    1
    kattolo
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2025 Mar
    Reputation: 0
    Country:Italy
    #5
    2025-03-17, 10:07 AM
    (2025-03-17, 09:58 AM)niels Wrote: If you have the Jellyfin DLNA plugin installed make sure it is NOT at version 7. Version 6 or 8 are fine.

    This was the solution for me, Thank you very much.  Smiling-face

    Hopefully it will be the same for  frostyslav !
    frostyslav
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2025 Mar
    Reputation: 0
    #6
    2025-03-18, 08:54 AM
    It worked for me as well. Thank you, niels!
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode