jellyfin / jellyfin-androidtv

Android TV Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.73k stars 466 forks source link

Shield; No playable Items error #383

Closed groenator closed 3 years ago

groenator commented 4 years ago

Hi,

When I am playing a show, movie or live TV on my Shield from time to time the stream stops and then I am getting an error about; "no playable items found". At the time when the stream was stopped the logs are complaining that the stream didn't have a logo? I've seen this issue before with emby too.

I am using jellyfin 10.5.0 version and Android TV latest version.

Here are the logs;

[2020-03-05 20:22:47.824 +00:00] [INF] Request starting HTTP/1.1 GET http://jellyfin.server/Items/97535bb3e98f097497a463f3834db687/Images/Logo?MaxWidth=440&EnableImageEnhancers=true [2020-03-05 20:22:47.824 +00:00] [ERR] Error processing request MediaBrowser.Common.Extensions.ResourceNotFoundException: The Conners does not have an image of type Logo at MediaBrowser.Api.Images.ImageService.GetImage(ImageRequest request, Guid itemId, BaseItem item, Boolean isHeadRequest) at Emby.Server.Implementations.Services.ServiceExecGeneral.Execute(Type serviceType, IRequest request, Object instance, Object requestDto, String requestName) at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost httpHost, Object requestDto, IRequest req) at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IRequest httpReq, HttpResponse httpRes, ILogger logger, CancellationToken cancellationToken) at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken) [2020-03-05 20:22:47.825 +00:00] [INF] Request finished in 1.1031ms 404 text/plain [2020-03-05 20:22:47.831 +00:00] [INF] Request starting HTTP/1.1 GET http://jellyfin.server/Items/17558706d10d18775e8aa102b60aeaa6/Images/Primary?EnableImageEnhancers=true&MaxHeight=600 [2020-03-05 20:22:47.832 +00:00] [INF] Request starting HTTP/1.1 GET http://jellyfin.server/Videos/11c96ec33107668026bf090343433758/stream.mov?api_key=1792dfa6bcac4c2d8778bf8ce0626eb2&DeviceId=b61390e22f820e43&MediaSourceId=11c96ec33107668026bf090343433758&Tag=b907e4918a296ffbe78d059f5d779e0f&Static=true [2020-03-05 20:22:47.832 +00:00] [INF] Request finished in 1.2285ms 200 image/jpeg [2020-03-05 20:22:47.839 +00:00] [INF] Request starting HTTP/1.1 GET http://jellyfin.server/Studios/ABC+(US)/Images/Primary?EnableImageEnhancers=true&MaxHeight=60 [2020-03-05 20:22:47.839 +00:00] [ERR] Error processing request System.ArgumentException: Invalid type (Parameter 'type') at MediaBrowser.Api.BaseApiService.GetItemByName(String name, String type, ILibraryManager libraryManager, DtoOptions dtoOptions) at MediaBrowser.Api.Images.ImageService.Get(GetItemByNameImage request) at Emby.Server.Implementations.Services.ServiceExecGeneral.Execute(Type serviceType, IRequest request, Object instance, Object requestDto, String requestName) at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost httpHost, Object requestDto, IRequest req) at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IRequest httpReq, HttpResponse httpRes, ILogger logger, CancellationToken cancellationToken) at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken) [2020-03-05 20:22:47.840 +00:00] [INF] Request finished in 0.9459ms 400 text/plain [2020-03-05 20:22:47.877 +00:00] [INF] Request starting HTTP/1.1 POST http://jellyfin.server/Sessions/Playing application/json 197 [2020-03-05 20:22:47.945 +00:00] [INF] Request finished in 68.5017ms 204 [2020-03-05 20:22:47.953 +00:00] [INF] Request starting HTTP/1.1 GET http://jellyfin.server/Videos/11c96ec33107668026bf090343433758/stream.mov?api_key=1792dfa6bcac4c2d8778bf8ce0626eb2&DeviceId=b61390e22f820e43&MediaSourceId=11c96ec33107668026bf090343433758&Tag=b907e4918a296ffbe78d059f5d779e0f&Static=true [2020-03-05 20:22:48.104 +00:00] [ERR] Error processing request: "The operation was canceled." [2020-03-05 20:22:48.104 +00:00] [INF] Request finished in 272.0713ms 200 video/quicktime [2020-03-05 20:22:48.115 +00:00] [INF] Request finished in 161.288ms 206 video/quicktime [2020-03-05 20:22:48.142 +00:00] [INF] Request starting HTTP/1.1 GET http://jellyfin.server/Videos/11c96ec33107668026bf090343433758/stream.mov?api_key=1792dfa6bcac4c2d8778bf8ce0626eb2&DeviceId=b61390e22f820e43&MediaSourceId=11c96ec33107668026bf090343433758&Tag=b907e4918a296ffbe78d059f5d779e0f&Static=true [2020-03-05 20:22:48.620 +00:00] [INF] Request starting HTTP/1.1 POST http://jellyfin.server/Sessions/Playing/Progress application/json 262 [2020-03-05 20:22:48.701 +00:00] [INF] Request finished in 81.1132ms 204 [2020-03-05 20:22:48.747 +00:00] [INF] Request starting HTTP/1.1 GET http://jellyfin.server/Videos/11c96ec33107668026bf090343433758/stream.mov?api_key=1792dfa6bcac4c2d8778bf8ce0626eb2&DeviceId=b61390e22f820e43&MediaSourceId=11c96ec33107668026bf090343433758&Tag=b907e4918a296ffbe78d059f5d779e0f&Static=true [2020-03-05 20:22:48.763 +00:00] [ERR] Error processing request: "The operation was canceled." [2020-03-05 20:22:48.763 +00:00] [WRN] HTTP Response 206 to "192.168.1.37". Time (slow): 0:00:00.6206055. "http://jellyfin.server/Videos/11c96ec33107668026bf090343433758/stream.mov?DeviceId=b61390e22f820e43&MediaSourceId=11c96ec33107668026bf090343433758&Tag=b907e4918a296ffbe78d059f5d779e0f&Static=true" [2020-03-05 20:22:48.763 +00:00] [INF] Request finished in 620.7735ms 206 video/quicktime [2020-03-05 20:22:51.620 +00:00] [INF] Request starting HTTP/1.1 POST http://jellyfin.server/Sessions/Playing/Progress application/json 271 [2020-03-05 20:22:51.691 +00:00] [INF] Request finished in 70.8815ms 204 [2020-03-05 20:22:54.620 +00:00] [INF] Request starting HTTP/1.1 POST http://jellyfin.server/Sessions/Playing/Progress application/json 271 [2020-03-05 20:22:54.723 +00:00] [INF] Request finished in 102.9687ms 204 [2020-03-05 20:22:57.620 +00:00] [INF] Request starting HTTP/1.1 POST http://jellyfin.server/Sessions/Playing/Progress application/json 271 [2020-03-05 20:22:57.695 +00:00] [INF] Request finished in 75.7277ms 204 [2020-03-05 20:23:00.620 +00:00] [INF] Request starting HTTP/1.1 POST http://jellyfin.server/Sessions/Playing/Progress application/json 271 [2020-03-05 20:23:00.673 +00:00] [INF] Request finished in 52.7302ms 204 [2020-03-05 20:23:02.826 +00:00] [INF] Request starting HTTP/1.1 POST http://jellyfin.server/Sessions/Playing/Stopped application/json 138 [2020-03-05 20:23:02.827 +00:00] [INF] Playback stopped reported by app "AndroidTV" "0.11.1" playing "O Sister, Where Art Thou?". Stopped at "785200" ms [2020-03-05 20:23:02.873 +00:00] [ERR] Error processing request: "The operation was canceled." [2020-03-05 20:23:02.873 +00:00] [WRN] HTTP Response 206 to "192.168.1.37". Time (slow): 0:00:14.1252826. "http://jellyfin.serverVideos/11c96ec33107668026bf090343433758/stream.mov?DeviceId=b61390e22f820e43&MediaSourceId=11c96ec33107668026bf090343433758&Tag=b907e4918a296ffbe78d059f5d779e0f&Static=true" [2020-03-05 20:23:02.873 +00:00] [INF] Request finished in 14125.4745ms 206 video/quicktime [2020-03-05 20:23:02.888 +00:00] [INF] Request finished in 61.7964ms 204 [2020-03-05 20:23:03.050 +00:00] [INF] Request starting HTTP/1.1 GET http://jellyfin.serverUsers/67a71e4bea1341d0b51f4dc32327da38/Items/11c96ec33107668026bf090343433758?format=json [2020-03-05 20:23:03.052 +00:00] [INF] Request finished in 2.7684ms 200 application/json; charset=utf-8 [2020-03-05 20:23:03.140 +00:00] [INF] Request starting HTTP/1.1 GET http://jellyfin.server/Items/97535bb3e98f097497a463f3834db687/Images/Logo?MaxWidth=600&EnableImageEnhancers=true [2020-03-05 20:23:03.141 +00:00] [ERR] Error processing request MediaBrowser.Common.Extensions.ResourceNotFoundException: The Conners does not have an image of type Logo at MediaBrowser.Api.Images.ImageService.GetImage(ImageRequest request, Guid itemId, BaseItem item, Boolean isHeadRequest) at Emby.Server.Implementations.Services.ServiceExecGeneral.Execute(Type serviceType, IRequest request, Object instance, Object requestDto, String requestName) at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost httpHost, Object requestDto, IRequest req) at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IRequest httpReq, HttpResponse httpRes, ILogger logger, CancellationToken cancellationToken) at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken)

This is only happening with sheild, other clients are working fine.

Regards.

groenator commented 4 years ago

Thank you for marking this as a bug.

dr8 commented 4 years ago

This affects me too. Looking at the code, one of the exceptions is caused by the http requests like http://jellyfin.server/Studios/ABC+(US)/Images/Primary?EnableImageEnhancers=true&MaxHeight=60

which throws an exception because MediaBrowser.Api/BaseApiService.cs does a check on a 'type' and rejects 'Studios'.

In my case, what I see is an attempt to launch a video file results in a frozen screen with the first frame or so of the video, and nothing happens (it's also unresponsive) until the shield jellyfin app restarts. It usually works on the second attempt (or maybe third).

I don't tend to watch many things in a row, so it's often the case that the failure is the first time in the day that I've used the Shield app. I don't know if it's connected to some background process that runs overnight or not.

dr8 commented 4 years ago

Note that the use of 'Studios' rather than 'Studio' in the URL comes from this method

which presumably needs to be tweaked to change it to 'Studio' to match the type check in the BaseApiService here

     Gets an image url that can be used to download an image from the api

 @param name The name.
 @param options The options.
 @return System.String.
 @exception System.ArgumentNullException name
*/
public final String GetStudioImageUrl(String name, ImageOptions options)
{
    if (tangible.DotNetToJavaStringHelper.isNullOrEmpty(name))
    {
        throw new IllegalArgumentException("name");
    }
    String url = "Studios/" + GetSlugName(name) + "/Images/" + options.getImageType();
    return GetImageUrl(url, options, new QueryStringDictionary());
}

I don't know if fixing that bug will fix the playback issue, of course

stale[bot] commented 4 years ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

BearTS commented 2 years ago

I have the same issue

shirou93 commented 2 years ago

I have same issue on ATV11

kchelvan commented 2 years ago

Experiencing the same issue with my Shield TV as well.

n00mkrad commented 2 months ago

I get this on the latest beta