jellyfin / jellyfin-plugin-dlna

GNU General Public License v3.0
23 stars 13 forks source link

[Issue]: Jellyfin requesting 404 resources causing play-to feature to fail #39

Open SodaWithoutSparkles opened 1 year ago

SodaWithoutSparkles commented 1 year ago

Please describe your bug

Jellyfin requested a 404 resource on the DLNA device causing playback to fail. The path it requested does not appear in the BaseURL (which linked to a xml file) that describes its functions.

Steps to reproduce:

  1. Get a Mi AI sound box
  2. Enable DLNA in Jellyfin
  3. Try the play-to feature on a song

Jellyfin Version

10.8.z

if other:

No response

Environment

- OS:Raspberry pi OS bullseye
- Linux Kernel: 6.1.21
- Virtualization: None
- Clients: Android
- Browser:
- FFmpeg Version:
- Playback Method: Play-to
- Hardware Acceleration:
- GPU Model:
- Plugins:
- Reverse Proxy: None
- Base URL:
- Networking:
- Storage:

Jellyfin logs

[2023-07-04 20:23:04.677 +08:00] [ERR] [8] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/Sessions/001d6aab4d5094e7071f294ad5623b10/Playing".
System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Emby.Dlna.PlayTo.SsdpHttpClient.GetDataAsync(String url, CancellationToken cancellationToken)
   at Emby.Dlna.PlayTo.Device.GetAVProtocolAsync(CancellationToken cancellationToken)
   at Emby.Dlna.PlayTo.Device.SetAvTransport(String url, String header, String metaData, CancellationToken cancellationToken)
   at Emby.Dlna.PlayTo.PlayToController.SetPlaylistIndex(Int32 index, CancellationToken cancellationToken)
   at Emby.Dlna.PlayTo.PlayToController.PlayItems(IEnumerable`1 items, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Session.SessionManager.SendMessageToSession[T](SessionInfo session, SessionMessageType name, T data, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Session.SessionManager.SendPlayCommand(String controllingSessionId, String sessionId, PlayRequest command, CancellationToken cancellationToken)
   at Jellyfin.Api.Controllers.SessionController.Play(String sessionId, PlayCommand playCommand, Guid[] itemIds, Nullable`1 startPositionTicks, String mediaSourceId, Nullable`1 audioStreamIndex, Nullable`1 subtitleStreamIndex, Nullable`1 startIndex)
   at lambda_method1172(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   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>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   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>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   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 Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.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.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

FFmpeg logs

No response

Please attach any browser or client logs here

Archive.zip

The zip file contained:

Please attach any screenshots here

No response

Code of Conduct

jellyfin-bot commented 1 year ago

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

hunjixin commented 10 months ago

also get error with mi ai sound box. log was below, i'm not sure is the same reason

[14:02:02] [DBG] [44] Jellyfin.Networking.Manager.NetworkManager: 192.168.1.25/32: GetBindInterface: Has source, matched best internal interface on range. 192.168.1.16
[14:02:02] [DBG] [44] Emby.Dlna.Main.DlnaEntryPoint: Dlna Device.Start
[14:02:02] [INF] [44] Emby.Dlna.DlnaManager: No matching device profile found. The default will need to be used. 
{"FriendlyName": "小爱音箱-9714", "ModelNumber": "S12", "SerialNumber": null, "ModelName": "S12", "ModelDescription": "The Mi AI SoundBox", "ModelUrl": null, "Manufacturer": "Mi, Inc.", "ManufacturerUrl": null, "Headers": [], "$type": "DeviceIdentification"}
[14:02:02] [INF] [44] Emby.Dlna.Main.DlnaEntryPoint: DLNA Session created for 小爱音箱-9714 - S12
[14:02:03] [ERR] [44] Emby.Dlna.Main.DlnaEntryPoint: Error updating device info for 小爱音箱-9714
System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Emby.Dlna.PlayTo.SsdpHttpClient.GetDataAsync(String url, CancellationToken cancellationToken)
   at Emby.Dlna.PlayTo.Device.GetAVProtocolAsync(CancellationToken cancellationToken)
   at Emby.Dlna.PlayTo.Device.TimerCallback(Object sender)