iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
16.46k stars 1.85k forks source link

[Bug] Missing hash key: "streamingData" (KeyError) #4893

Closed mrgrey916 closed 1 month ago

mrgrey916 commented 2 months ago

Got this error this morning, and only for that video, the few others I've played are fine.

Title: Missing hash key: "streamingData" (KeyError) Date: 2024-09-02T09:14:29Z Route: /watch?v=8zmKbaV1vN8 Version: 2024.08.26-4782a67 @ (HEAD detached at v2.20240825.2)

Backtrace

``` Missing hash key: "streamingData" (KeyError) from /usr/share/crystal/src/hash.cr:1151:9 in 'dig' from /usr/share/crystal/src/json/any.cr:261:3 in 'adaptive_fmts' from src/invidious/routes/watch.cr:123:5 in 'handle' from lib/kemal/src/kemal/route.cr:13:9 in '->' from src/invidious/helpers/handlers.cr:30:37 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/invidious/helpers/handlers.cr:94:12 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/ext/kemal_static_file_handler.cr:106:14 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'handle_client' from /usr/share/crystal/src/fiber.cr:141:11 in 'run' from ??? ```

TheTrueWhiteOwl commented 2 months ago

Same here! Here is my logs:

Logs

Title: Missing hash key: "streamingData" (KeyError) Date: 2024-09-02T16:54:58Z Route: /watch?v=DQB-cJPYChg Version: 2024.08.25-3e17d048 @ master

Backtrace

``` Missing hash key: "streamingData" (KeyError) from /usr/share/crystal/src/hash.cr:1148:11 in '[]' from /usr/share/crystal/src/hash.cr:1199:17 in 'dig' from src/invidious/videos.cr:156:18 in 'adaptive_fmts' from src/invidious/routes/watch.cr:121:5 in 'handle' from src/invidious/routing.cr:159:19 in '->' from lib/kemal/src/kemal/route.cr:12:26 in '->' from src/invidious/helpers/handlers.cr:30:5 in 'process_request' from lib/kemal/src/kemal/route_handler.cr:17:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from lib/kemal/src/kemal/websocket_handler.cr:13:14 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/invidious/helpers/handlers.cr:157:5 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/invidious/helpers/handlers.cr:94:12 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/invidious/helpers/handlers.cr:146:5 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/invidious/helpers/handlers.cr:70:5 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/ext/kemal_static_file_handler.cr:162:16 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from lib/kemal/src/kemal/exception_handler.cr:8:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/invidious/helpers/logger.cr:17:35 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from lib/kemal/src/kemal/init_handler.cr:12:7 in 'call' from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process' from /usr/share/crystal/src/http/server.cr:521:5 in 'handle_client' from /usr/share/crystal/src/http/server.cr:451:5 in '->' from /usr/share/crystal/src/fiber.cr:143:11 in 'run' from /usr/share/crystal/src/fiber.cr:95:34 in '->' from ??? ```

Fijxu commented 2 months ago

Merging #4850 seems to fix it. I discovered it by accident because I merged that commit into my Invidious fork to use it on my instance (My public instance is not using that commit tho, is sitting at 5ced7694fe).

When I pulled my invidious fork to debug it, it already had the pending pull request (#4850) and the premiere (/watch?v=DQB-cJPYChg) was displayed on Invidious without errors.

iBicha commented 2 months ago

Interesting, I saw a similar error but for missing adaptiveFormats. This is supposed to be a live video, and works on YouTube. Also, the api (/api/v1/videos/6K6N0z93Vj0) returns a 200 status code and an empty response

Title: Missing hash key: "adaptiveFormats" (KeyError) Date: 2024-09-02T22:54:37Z Route: /watch?v=6K6N0z93Vj0 Version: 2024.08.26-4782a67 @ master

Backtrace

``` Missing hash key: "adaptiveFormats" (KeyError) from /usr/share/crystal/src/hash.cr:1151:9 in '??' from /usr/share/crystal/src/json/any.cr:261:3 in 'adaptive_fmts' from src/invidious/routes/watch.cr:123:5 in 'handle' from lib/kemal/src/kemal/route.cr:13:9 in '->' from src/invidious/helpers/handlers.cr:30:37 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/invidious/helpers/handlers.cr:94:12 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/ext/kemal_static_file_handler.cr:106:14 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'handle_client' from /usr/share/crystal/src/fiber.cr:141:11 in 'run' from ??? ```

retrocaster commented 2 months ago

I'm seeing the same for the following:

Title: Missing hash key: "streamingData" (KeyError) Date: 2024-09-05T21:45:44Z Route: /watch?v=fobcz96o3PE Version: 2024.08.26-4782a67 @ (HEAD detached at v2.20240825.2)

iGerman00 commented 2 months ago

Same issue. This video as of now is a premiere. Previously, premieres returned information okay on Invidious, but now it's a fatal error.

Title: Missing hash key: "streamingData" (KeyError) Date: 2024-09-12T19:01:20Z Route: /watch?v=acdYs9tPLko Version: 2024.08.26-4782a67 @ (HEAD detached at v2.20240825.2)

Backtrace

``` Missing hash key: "streamingData" (KeyError) from src/invidious/helpers/helpers.cr:188 in 'dig' from /usr/lib/crystal/core/json/any.cr:261:3 in 'adaptive_fmts' from src/invidious/routes/watch.cr:123:5 in 'handle' from lib/kemal/src/kemal/route.cr:13:9 in '->' from lib/kemal/src/kemal/config.cr:92:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:32:7 in 'call_next' from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:32:7 in 'call_next' from src/invidious/helpers/handlers.cr:94:12 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:32:7 in 'call_next' from /usr/lib/crystal/core/string.cr:3075:20 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/request_processor.cr:51:11 in 'handle_client' from /usr/lib/crystal/core/fiber.cr:146:11 in 'run' from ??? ```

mlazzarotto commented 1 month ago

Same Title: Missing hash key: "streamingData" (KeyError) Date: 2024-10-19T15:21:22Z Route: /watch?v=2tF0QcVEcxU Version: 2024.08.26-4782a67 @ (HEAD detached at v2.20240825.2)

Backtrace

``` Missing hash key: "streamingData" (KeyError) from /usr/share/crystal/src/hash.cr:1151:9 in 'dig' from /usr/share/crystal/src/json/any.cr:261:3 in 'adaptive_fmts' from src/invidious/routes/watch.cr:123:5 in 'handle' from lib/kemal/src/kemal/route.cr:13:9 in '->' from src/invidious/helpers/handlers.cr:30:37 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/invidious/helpers/handlers.cr:94:12 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/ext/kemal_static_file_handler.cr:106:14 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call' from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'handle_client' from /usr/share/crystal/src/fiber.cr:141:11 in 'run' from ??? ```