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: "adaptiveFormats" (KeyError) #4885

Closed rammjet closed 2 months ago

rammjet commented 2 months ago

Only seems to happen on live streams that have been online for months. Other videos are good. This has been happening for the past several days. Other instances work fine.

Title:Missing hash key: "adaptiveFormats" (KeyError) Date:2024-08-28T18:41:03Z Route:/watch?v=mhJRzQsLZGg Version:2024.08.26-4782a67 @ (HEAD detached at v2.20240825.2)`

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 ??? ```

`
evilantishad0w commented 2 months ago

4734 - don't know if this is new behavior though, bug report says it applies to all videos, not specific streams.

rammjet commented 2 months ago

Before posting, I tried three public instances and all worked on livestreams. I thought my instance had a problem even though I hadn't done anything except update regularly.

Today, I tried four more. One worked, one gave the same above error, and two wouldn't load.

So, I'll just wait to see what happens.

evilantishad0w commented 2 months ago

There's a fix for the issue at the bottom of that bug report. I haven't tried it because it isn't simple to implement and I suspect everything will break if it's pushed to mainline and I'd have to rebuild the instance. So I will wait too.

rammjet commented 2 months ago

The fix in the bug report works!

Make a backup of your existing docker-compose.yml Run a docker command and obtain two credentials Update the docker-compose.yml to change "latest" to "master" and add credentials and a section to docker-compose.yml Run

unixfox commented 2 months ago

Duplicate of https://github.com/iv-org/invidious/issues/4734