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] Could not extract JSON error when switching to a channel #5076

Closed kladderadeng closed 2 weeks ago

kladderadeng commented 2 weeks ago

Describe the bug Since a few days, when navigating from my self-hosted Invidious instances Feed -> Popular to a creators Channel by clicking on the name of the creator, which usually brings me to his channel, I get the error message "Could not extract JSON. Youtube API returned error 400 with message: "Request contains an invalid argument"".

Steps to Reproduce

  1. On your Feed (https://invidious.instance/feed/popular), click on the name of the creator below one of the videos shown to switch to his channel.
  2. I see the message posted above and the channel contents are not shown.

Logs These are the logs of the container from when I click on the creators name until the error message pops up in the browser:

invidious            | 2024-11-10 09:31:56 UTC [error] YoutubeAPI: Got error 400 when requesting /youtubei/v1/browse
invidious            | 2024-11-10 09:31:56 UTC [error] YoutubeAPI: Request contains an invalid argument.
invidious            | 2024-11-10 09:31:56 UTC [info] YoutubeAPI: POST data was: {"context" => {"client" => {"hl" => "en", "gl" => "US", "clientName" => "WEB", "clientVersion" => "2.20240814.00.00", "clientScreen" => "WATCH_FULL_SCREEN", "osName" => "Windows", "osVersion" => "10.0", "platform" => "DESKTOP", "visitorData" => "<redacted>"}}, "continuation" => "<redacted>"}
invidious            | Exception: Could not extract JSON. Youtube API returned error 400 with message:<br>"Request contains an invalid argument." (InfoException)
invidious            |   from /usr/share/crystal/src/io/buffered.cr:265:5 in '_post_json'
invidious            |   from src/invidious/channels/videos.cr:107:12 in 'get_videos:continuation:sort_by'
invidious            |   from src/invidious/channels/videos.cr:87:12 in 'videos'
invidious            |   from lib/kemal/src/kemal/route.cr:13:9 in '->'
invidious            |   from src/invidious/helpers/handlers.cr:30:37 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
invidious            |   from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
invidious            |   from src/invidious/helpers/handlers.cr:94:12 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
invidious            |   from src/ext/kemal_static_file_handler.cr:106:14 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
invidious            |   from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'handle_client'
invidious            |   from /usr/share/crystal/src/fiber.cr:141:11 in 'run'
invidious            |   from ???
invidious            |
invidious            | 2024-11-10 09:31:56 UTC [warn] i18n: Missing translation key "Could not extract JSON. Youtube API returned error 400 with message:<br>"Request contains an invalid argument.""
invidious            | 2024-11-10 09:31:56 UTC [info] 500 GET /channel/UCFyP17HoU-vpxhIpGXnXx2g 499.33ms
invidious            | 2024-11-10 09:31:56 UTC [info] 200 GET /api/v1/auth/subscriptions 4.48ms

Screenshots image

Additional context

unixfox commented 2 weeks ago

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