2025-03-15, 01:54 PM
As of yesterday I see the same error in my logs. The problem I encounter is completely different tough. I use multi-scrobbler which connects to the Jellyfin API to get recently listened tracks. This has been running fine for 6 weeks (Jellyfin 10.10.6 on Ubuntu), Multi-scrobbler 0.9.1 running as docker on CasaOS. As of yesterday Multi-scrobbler can't connect to Jellyfin anymore.
At first I saw in the multi-scrobbler logs:
Since the request failed with code 500 I started looking in the Jellyfin logs I saw the same error you encounter:
I searched older logs and it only appears in the logs for today (2025-03-15) and yesterday (2025-03-14). So it seems yesterday something changed or happened which started causing this error. I run jellyfin 10.10.6 since 26 februari so it's not caused by an update.
I few things I tried, all without success: restart jellyfin. Create a new API key for multi-scrobbler. Restart the entire Proxmox node on which jellyfin is running.
As you mention the cast button in the jellyfin app also seems to have become non-responsive.
At first I saw in the multi-scrobbler logs:
Code:
[2025-03-15 13:36:20.823 +0000] ERROR : [App] [Sources] [Jellyfin - MyJellyfin] Error occurred while polling
Error: Error occurred while polling
at JellyfinApiSource.doPolling (CWD/src/backend/sources/AbstractSource.ts:482:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async JellyfinApiSource.startPolling (CWD/src/backend/sources/AbstractSource.ts:333:27)
at async JellyfinApiSource.poll (CWD/src/backend/sources/AbstractSource.ts:301:9)
caused by: Error: Error occurred while refreshing recently played
at JellyfinApiSource.doPolling (CWD/src/backend/sources/AbstractSource.ts:402:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async JellyfinApiSource.startPolling (CWD/src/backend/sources/AbstractSource.ts:333:27)
at async JellyfinApiSource.poll (CWD/src/backend/sources/AbstractSource.ts:301:9)
caused by: AxiosError: Request failed with status code 500
at settle (file://CWD/node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (file://CWD/node_modules/axios/lib/adapters/http.js:599:11)
at IncomingMessage.emit (node:events:530:35)
at endReadableNT (node:internal/streams/readable:1698:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
at Axios.request (file://CWD/node_modules/axios/lib/core/Axios.js:45:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async JellyfinApiSource.getRecentlyPlayed (CWD/src/backend/sources/JellyfinApiSource.ts:426:26)
at async JellyfinApiSource.doPolling (CWD/src/backend/sources/AbstractSource.ts:400:32)
at async JellyfinApiSource.startPolling (CWD/src/backend/sources/AbstractSource.ts:333:27)
at async JellyfinApiSource.poll (CWD/src/backend/sources/AbstractSource.ts:301:9)
Since the request failed with code 500 I started looking in the Jellyfin logs I saw the same error you encounter:
Code:
[2025-03-15 00:06:57.124 +00:00] [ERR] 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 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)
I searched older logs and it only appears in the logs for today (2025-03-15) and yesterday (2025-03-14). So it seems yesterday something changed or happened which started causing this error. I run jellyfin 10.10.6 since 26 februari so it's not caused by an update.
I few things I tried, all without success: restart jellyfin. Create a new API key for multi-scrobbler. Restart the entire Proxmox node on which jellyfin is running.
As you mention the cast button in the jellyfin app also seems to have become non-responsive.