jellyfin / jellyfin-web

Web Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.3k stars 1.23k forks source link

[Issue]: Loading error when Live TV Access is denied for User with "Live TV" or "Active Recordings" on Home Screen #4904

Closed QantumEntangled closed 6 months ago

QantumEntangled commented 11 months ago

Please describe your bug

On any non-dashboard screen, jellyfin leaves the "loading" animation going indefinitely when the user's permissions access to Live TV is disabled, but the user has "Live TV" or "Active Recordings" set for any of their home screen sections.

Loading pages works but very slowly, and starting playback still works, but the loading animation plays on all screens other than the playback and dashboard screens.

Update 2023-10-23:

Steps to reproduce:

  1. Add User
  2. Disable "Allow Live TV access"
  3. Modify user's settings > Home > Set one of the "Home Screen Section X" settings to either "Live TV" or "Active Recordings"
  4. Login as User.

Jellyfin Version

10.8.11

Environment

- OS: Linux
- Virtualization: Docker Compose
- Clients: Web, Windows, Android
- Browser: Firefox
- Hardware Acceleration: Disabled
- Plugins: All Disabled
- Reverse Proxy: Caddy
- Networking: LAN, WAN, & Local
- Storage: Docker Mapped folder to local mounted ZFS pool

Jellyfin logs

[2023-10-23 10:25:02.046 -07:00] [INF] [3] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:25:03.855 -07:00] [WRN] [66] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Users/68536201d9af42ea9ec103fa85b4a49d/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=f137a2dd21bbc1b99aa5c0f6bf02a805" to "172.20.0.23" in 0:00:01.3170629 with Status Code 200
[2023-10-23 10:25:04.431 -07:00] [WRN] [81] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Users/68536201d9af42ea9ec103fa85b4a49d/Items/Resume?Limit=12&Recursive=true&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&EnableTotalRecordCount=false&MediaTypes=Video" to "172.20.0.23" in 0:00:01.896766 with Status Code 200
[2023-10-23 10:25:04.445 -07:00] [WRN] [83] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Users/68536201d9af42ea9ec103fa85b4a49d/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=a656b907eb3a73532e40e44b968d0225" to "172.20.0.23" in 0:00:01.9113992 with Status Code 200
[2023-10-23 10:25:04.449 -07:00] [WRN] [3] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/LiveTv/Recordings?userId=68536201d9af42ea9ec103fa85b4a49d&Limit=12&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo&EnableTotalRecordCount=false&IsInProgress=true" to "172.20.0.23" in 0:00:01.9113692 with Status Code 200
[2023-10-23 10:25:04.583 -07:00] [WRN] [51] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Shows/NextUp?Limit=24&Fields=PrimaryImageAspectRatio%2CDateCreated%2CBasicSyncInfo%2CPath%2CMediaSourceCount&UserId=68536201d9af42ea9ec103fa85b4a49d&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CBanner%2CThumb&EnableTotalRecordCount=false&DisableFirstEpisode=false&NextUpDateCutoff=2022-10-23T17%3A25%3A03.596Z&EnableRewatching=false" to "172.20.0.23" in 0:00:02.039764 with Status Code 200
[2023-10-23 10:25:05.653 -07:00] [INF] [3] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:25:05.914 -07:00] [WRN] [102] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Items/67adf136d3ad4b06367a70c066134b23/Images/Backdrop/0?tag=5c13d4bd62504f93d7f66744c42d21de&maxWidth=1920&quality=80" to "172.20.0.23" in 0:00:03.3944159 with Status Code 200
[2023-10-23 10:25:06.656 -07:00] [WRN] [81] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Items/9ce349bc74cf7fbe1231613d7e2757c5/Images/Primary?fillHeight=296&fillWidth=197&quality=96&tag=f5f70bdb0ee7f89803fe487bb4ae40ee" to "172.20.0.23" in 0:00:02.187543 with Status Code 200
[2023-10-23 10:25:08.389 -07:00] [INF] [92] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:25:09.022 -07:00] [WRN] [29] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Items/b80aa7cd9b1f8bce1a1790d368346ed3/Images/Primary?fillHeight=296&fillWidth=197&quality=96&tag=342a888f457d36fbe5f7ec2aa19bf3d7" to "172.20.0.23" in 0:00:05.128275 with Status Code 200
[2023-10-23 10:25:09.838 -07:00] [WRN] [30] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Items/6aaf6e3dda69602abee44a51a31d6f66/Images/Backdrop/0?tag=d7f329bbe09db5918fc0ef66abc997b7&maxWidth=1920&quality=80" to "172.20.0.23" in 0:00:01.3027808 with Status Code 200
[2023-10-23 10:25:12.314 -07:00] [INF] [81] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:25:16.290 -07:00] [WRN] [102] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Items/9ce349bc74cf7fbe1231613d7e2757c5/Images/Backdrop/0?tag=cb3083bf5b3900b22968ceb5fb8a7c4f&maxWidth=1920&quality=80" to "172.20.0.23" in 0:00:03.717759 with Status Code 200
[2023-10-23 10:26:46.356 -07:00] [WRN] [66] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Items/29e098a24d6ebf81db6cfaddae5c3221/Images/Backdrop/0?tag=02d602daa2a78ffecee0433658585052&maxWidth=1920&quality=80" to "172.20.0.23" in 0:00:01.1198166 with Status Code 200
[2023-10-23 10:27:45.320 -07:00] [INF] [83] Jellyfin.Server.Implementations.Users.UserManager: Authentication request for "ExampleAdminUser" has succeeded.
[2023-10-23 10:27:45.322 -07:00] [INF] [83] Emby.Server.Implementations.Session.SessionManager: Current/Max sessions for user "ExampleAdminUser": 0/0
[2023-10-23 10:27:45.405 -07:00] [INF] [83] Emby.Server.Implementations.Session.SessionManager: Creating new access token for user b1203356-99dc-4520-ba59-403aa13da667
[2023-10-23 10:27:45.483 -07:00] [INF] [54] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:27:47.427 -07:00] [WRN] [63] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Items/173288dd24975fcc12c5b3e45057e335/Images/Thumb?fillHeight=177&fillWidth=315&quality=96&tag=13f59706dec05bd88258aa9e5220bee2" to "172.20.0.23" in 0:00:01.2000733 with Status Code 200
[2023-10-23 10:27:47.958 -07:00] [WRN] [54] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Items/1a339b85b77a9b73bc7c7ca6aa2817c1/Images/Thumb?fillHeight=177&fillWidth=315&quality=96&tag=dfe228ca20839793c1b7ea214f940849" to "172.20.0.23" in 0:00:01.7294994 with Status Code 200
[2023-10-23 10:27:52.072 -07:00] [WRN] [83] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://jellyfin.domain.tld/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary?fillHeight=210&fillWidth=315&quality=96&tag=e04475061985ed19001e41cd6c7436f5" to "172.20.0.23" in 0:00:06.3538236 with Status Code 200
[2023-10-23 10:27:56.624 -07:00] [INF] [23] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:27:56.968 -07:00] [INF] [55] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:28:02.164 -07:00] [INF] [54] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2023-10-23 10:28:14.162 -07:00] [INF] [63] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets.
[2023-10-23 10:28:15.990 -07:00] [INF] [23] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:28:16.250 -07:00] [INF] [77] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:28:22.912 -07:00] [INF] [108] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:28:23.197 -07:00] [INF] [54] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:28:31.646 -07:00] [INF] [108] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:28:31.900 -07:00] [INF] [55] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:28:37.658 -07:00] [INF] [83] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:28:37.925 -07:00] [INF] [83] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:28:39.794 -07:00] [INF] [54] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:28:40.052 -07:00] [INF] [23] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:28:47.670 -07:00] [INF] [30] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:28:47.988 -07:00] [INF] [23] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:28:49.488 -07:00] [INF] [18] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:28:49.767 -07:00] [INF] [18] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:29:11.600 -07:00] [INF] [23] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:29:11.944 -07:00] [INF] [18] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:29:40.302 -07:00] [ERR] [63] Jellyfin.Api.Controllers.DisplayPreferencesController: Invalid ViewType: ""
[2023-10-23 10:29:40.303 -07:00] [ERR] [63] Jellyfin.Api.Controllers.DisplayPreferencesController: Invalid ViewType: ""
[2023-10-23 10:29:53.627 -07:00] [ERR] [92] Jellyfin.Api.Controllers.DisplayPreferencesController: Invalid ViewType: ""
[2023-10-23 10:29:53.627 -07:00] [ERR] [92] Jellyfin.Api.Controllers.DisplayPreferencesController: Invalid ViewType: ""
[2023-10-23 10:29:56.998 -07:00] [INF] [77] Emby.Drawing.ImageProcessor: Creating image collage and saving to "/config/cache/temp/2543bfbe8f984418b959b2765d4d06ed.png"
[2023-10-23 10:29:57.985 -07:00] [INF] [77] Emby.Drawing.ImageProcessor: Completed creation of image collage and saved to "/config/cache/temp/2543bfbe8f984418b959b2765d4d06ed.png"
[2023-10-23 10:29:59.319 -07:00] [INF] [54] Emby.Drawing.ImageProcessor: Creating image collage and saving to "/config/cache/temp/c973efa0f497481ca2345d8fe7522cb9.png"
[2023-10-23 10:29:59.948 -07:00] [INF] [54] Emby.Drawing.ImageProcessor: Completed creation of image collage and saved to "/config/cache/temp/c973efa0f497481ca2345d8fe7522cb9.png"
[2023-10-23 10:30:11.876 -07:00] [INF] [45] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:30:12.158 -07:00] [INF] [45] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:30:52.721 -07:00] [INF] [18] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:30:53.038 -07:00] [INF] [40] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:30:55.269 -07:00] [INF] [40] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:30:55.448 -07:00] [INF] [92] Emby.Server.Implementations.Session.SessionManager: Logging out access token "ecbe1409c95943f88e9b52f0338ca4f9"
[2023-10-23 10:31:00.400 -07:00] [INF] [40] Jellyfin.Server.Implementations.Users.UserManager: Authentication request for "ExampleAdminUser" has succeeded.
[2023-10-23 10:31:00.400 -07:00] [INF] [40] Emby.Server.Implementations.Session.SessionManager: Current/Max sessions for user "ExampleAdminUser": 0/0
[2023-10-23 10:31:00.407 -07:00] [INF] [40] Emby.Server.Implementations.Session.SessionManager: Creating new access token for user b1203356-99dc-4520-ba59-403aa13da667
[2023-10-23 10:31:00.448 -07:00] [INF] [92] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:31:09.216 -07:00] [INF] [54] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:31:09.217 -07:00] [INF] [101] Emby.Server.Implementations.Session.SessionManager: Logging out access token "694a93ac8bac42d59a5593f99ad48d09"
[2023-10-23 10:31:14.586 -07:00] [INF] [101] Jellyfin.Server.Implementations.Users.UserManager: Authentication request for "ExistingAdminUser" has succeeded.
[2023-10-23 10:31:14.586 -07:00] [INF] [101] Emby.Server.Implementations.Session.SessionManager: Current/Max sessions for user "ExistingAdminUser": 1/0
[2023-10-23 10:31:14.593 -07:00] [INF] [101] Emby.Server.Implementations.Session.SessionManager: Creating new access token for user 68536201-d9af-42ea-9ec1-03fa85b4a49d
[2023-10-23 10:31:14.753 -07:00] [INF] [77] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:31:21.714 -07:00] [INF] [77] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:31:22.029 -07:00] [INF] [77] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:31:22.089 -07:00] [INF] [101] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was forbidden.
[2023-10-23 10:31:37.645 -07:00] [INF] [51] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was forbidden.
[2023-10-23 10:32:12.132 -07:00] [INF] [18] Emby.Server.Implementations.Session.SessionManager: Logging out access token "d72d161152ba4a91b2d2b2a600af7de9"
[2023-10-23 10:32:12.134 -07:00] [INF] [51] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" closed
[2023-10-23 10:32:12.650 -07:00] [INF] [3] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was challenged.
[2023-10-23 10:32:16.954 -07:00] [INF] [101] Jellyfin.Server.Implementations.Users.UserManager: Authentication request for "ExampleAdminUser" has succeeded.
[2023-10-23 10:32:16.954 -07:00] [INF] [101] Emby.Server.Implementations.Session.SessionManager: Current/Max sessions for user "ExampleAdminUser": 0/0
[2023-10-23 10:32:16.963 -07:00] [INF] [101] Emby.Server.Implementations.Session.SessionManager: Creating new access token for user b1203356-99dc-4520-ba59-403aa13da667
[2023-10-23 10:32:17.076 -07:00] [INF] [34] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "172.20.0.23" request
[2023-10-23 10:32:27.042 -07:00] [INF] [45] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was forbidden.
[2023-10-23 10:32:30.208 -07:00] [INF] [23] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was forbidden.
[2023-10-23 10:32:33.798 -07:00] [INF] [23] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was forbidden.
[2023-10-23 10:32:47.689 -07:00] [INF] [23] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was forbidden.
[2023-10-23 10:33:02.162 -07:00] [INF] [23] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.

FFmpeg logs

No response

Please attach any browser or client logs here

Uncaught (in promise) 
Response { type: "basic", url: "https://jellyfin.domain.tld/LiveTv/Recordings?userId=68536201d9af42ea9ec103fa85b4a49d&Limit=12&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo&EnableTotalRecordCount=false&IsInProgress=true", redirected: false, status: 403, ok: false, statusText: "", headers: Headers(6), body: ReadableStream, bodyUsed: false }

Code of Conduct

felix920506 commented 11 months ago

Please include Jellyfin logs.

QantumEntangled commented 11 months ago

Added Logs.

Also I was unable to reproduce with a newly created user account. Verified the Settings between "ExistingAdminUser" and "ExampleAdminUser". "ExistingAdminUser" still has the infinite loading animation when "Access Live TV" permission is disabled. But the new user does not.

I'll try changing some of the user profile settings to see if I can cause the issue on the new user.

QantumEntangled commented 11 months ago

Updated original comment. The issue seems to be caused by the "Home Screen Section" setting for both "Live TV" and "Active Recordings". If either is set for a user, but that user does not have access to Live TV, the infinite loading animation plays. Also seems to slow down loading times for the rest of the page contents a LOT.

I've updated the steps to reproduce above.

I don't know if it's easiest to simply suppress those "Home Screen Section" options for users without "Live TV" permission, or to suppress the attempts to load those sections when the user requests content for the home screen.

jellyfin-bot commented 7 months 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.