Jellyfin Forum
Cast Button find no device - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Cast Button find no device (/t-cast-button-find-no-device)



Cast Button find no device - brauni - 2025-03-15

I have set up jellyfin 10.10.6 on a Synology in a Docker container since a view days. Today I noticed that the cast icon function no longer works.
Previously, after clicking on the icon, my Chromecast sticks and some DLNA devices such as the TV were displayed for selection. This no longer works.
When I click on the cast icon, no selection appears.

I was able to reproduce this in both the Chrome/Firefox browser and the Android app jellyfin. Other apps like Netflix don't have this problem

The following entry can be found in the logbook, after the click on the cast-icon:

Code:
[2025-03-14 23:25:16.926 +00:00] [ERR] [12] 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


What could be the cause? I dont know what is changed, so it doesnt work anymore,
I have completely reinstalled jellyfin but without success. Also i have already searched the Internet for information on this, but have not found anything.

Many Thanks for any idea,
Andreas


RE: Cast Button find no device - teranex2 - 2025-03-15

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:
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.


RE: Cast Button find no device - TomM - 2025-03-15

I have/had the same problem.
I discovered that it has to do with updating the DLNA plugin. (7.0.0.0 from March 12, 2025) I uninstalled the plugin and went back to version 6.0.0.0. Now the cast button works again for me.
I have the automatic update in the config set to false, otherwise Jellyfin will switch back to version 7 on the next reboot.

Hope the hint can help.
Greetings Tom

..\jellyfin\config\plugins\DLNA_6.0.0.0\meta.json

(Jellyfin 10.10.6, Synology, Portainer, Docker)


RE: Cast Button find no device - teranex2 - 2025-03-15

O indeed the DLNA update is the culprit. If I disable the DLNA plugin, multi-scrobbler can connect again to Jellyfin. The cast button then also works again. Thank you for sharing this!


RE: Cast Button find no device - TomM - 2025-03-16

Does anyone know if the error is officially known and will be fixed?


RE: Cast Button find no device - findbaz - 2025-03-17

(2025-03-15, 02:11 PM)TomM Wrote: I have/had the same problem.
I discovered that it has to do with updating the DLNA plugin. (7.0.0.0 from March 12, 2025) I uninstalled the plugin and went back to version 6.0.0.0. Now the cast button works again for me.
I have the automatic update in the config set to false, otherwise Jellyfin will switch back to version 7 on the next reboot.

Hope the hint can help.
Greetings Tom

..\jellyfin\config\plugins\DLNA_6.0.0.0\meta.json

(Jellyfin 10.10.6, Synology, Portainer, Docker)

Thanks for this, really helped me out. I have Jellyfin installed via flatpak and spent an hour looking for that file you mentioned. Looks like flatpak does its on thing with installs. (time to get rid of that). This update came out 1 day after I migrated to Linux from Windows and it took me 6 hours to do that (fixing metadata) then the next morning BOOM no streaming, was starting to panic a bit.


RE: Cast Button find no device - TomM - 2025-03-17

Note: the new DLNA plugin version 8.0.0.0 from 17.03.2025 solved the problem for me. Just update the plugin to version 8.
Thanks for the quick fix of the bug by the developers.
Greetings Tom


RE: Cast Button find no device - brauni - 2025-03-18

Thanks to everyone for the many responses. This also enabled me to find a quick workaround (with DLNA Version 6.0.0.0)
With the DLNA-Plugin version 8.0.0.0 plugin it now works again.