iv-org / invidious

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

[Bug] Missing hash key #4770

Closed thickmelon closed 2 months ago

thickmelon commented 2 months ago

Describe the bug

The app appears to be able to grab metadata including the thumbnails from youtube just fine. Videos however, never work because of this "Missing hash key" error.

Steps to Reproduce Steps to reproduce the behavior:

  1. Open the self hosted invidious app
  2. Click on any video
  3. See error "missing hash key"

Logs

Title: `Missing hash key: "videoDetails" (KeyError)`
Date: `2024-07-03T07:53:08Z`
Route: `/watch?v=bvKQn8hDhyU`
Version: `2024.04.10-b673695 @ master`

<details>
<summary>Backtrace</summary>
<p>

Missing hash key: "videoDetails" (KeyError)
  from /usr/share/crystal/src/hash.cr:1080:9 in 'dig'
  from /usr/share/crystal/src/json/any.cr:330:3 in 'try_fetch_streaming_data'
  from src/invidious/videos/parser.cr:112:10 in 'extract_video_info:video_id'
  from /usr/share/crystal/src/hash.cr:1185:13 in 'fetch_video'
  from src/invidious/videos.cr:379:13 in 'get_video:region'
  from src/invidious/routes/watch.cr:55:15 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:146:11 in 'run'
  from ???

</p>
</details>

Screenshots

Additional context

unixfox commented 2 months ago

https://github.com/iv-org/invidious/issues/4723