Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] "Request contains an invalid argument." when going to channels #5021

Closed
johntitor0v0 opened this issue Oct 22, 2024 · 16 comments · Fixed by #5059
Closed

[Bug] "Request contains an invalid argument." when going to channels #5021

johntitor0v0 opened this issue Oct 22, 2024 · 16 comments · Fixed by #5059
Labels
bug Something isn't working

Comments

@johntitor0v0
Copy link

Describe the bug
Navigating to eg. /channel/UCSJ4gkVC6NrvII8umztf0Ow/streams returns Could not extract JSON. Youtube API returned error 400 with message: "Request contains an invalid argument."

Steps to Reproduce
Steps to reproduce the behavior:

  1. Go to https://inv.nadeko.net/channel/UCSJ4gkVC6NrvII8umztf0Ow/
  2. Click on the 'Livestreams' tab
  3. See error

Additional context
Does not work on local instance nor when using the API

@johntitor0v0 johntitor0v0 added the bug Something isn't working label Oct 22, 2024
@Le-Kat

This comment has been minimized.

@cruncheon
Copy link

Experiencing the same issue on my local instance. Logs with "visitorData" and "continuation" fields redacted:

2024-10-22 23:16:49 UTC [error] YoutubeAPI: Got error 400 when requesting /youtubei/v1/browse
2024-10-22 23:16:49 UTC [error] YoutubeAPI: Request contains an invalid argument.
2024-10-22 23:16:49 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"}
Exception: Could not extract JSON. Youtube API returned error 400 with message:<br>"Request contains an invalid argument." (InfoException)
  from /usr/lib/crystal/core/io/buffered.cr:256:5 in '_post_json'
  from src/invidious/channels/videos.cr:149:22 in 'get_60_livestreams:continuation:sort_by'
  from src/invidious/routes/channels.cr:125:34 in 'streams'
  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 ???

2024-10-22 23:16:51 UTC [warn] i18n: Missing translation key "Could not extract JSON. Youtube API returned error 400 with message:<br>"Request contains an invalid argument.""
2024-10-22 23:16:51 UTC [info] 500 GET /channel/UCpXBGqwsBkpvcYjsJBQ7LEQ/streams 2968.23ms

@PoLaKoSz
Copy link

PoLaKoSz commented Nov 5, 2024

Same for

  • channel/UCpDJl2EmP7Oh90Vylx0dZtA/streams
  • channel/UCwtPZLYmeerWoawWyoRiIBw/streams
2024-11-05 21:08:54 UTC [info] SigHelper: Using helper at 'inv_sig_helper:12999'
[production] Invidious is ready to lead at http://0.0.0.0:3000
2024-11-05 21:08:56 UTC [info] jobs: running ClearExpiredItems job
2024-11-05 21:08:56 UTC [info] jobs: ClearExpiredItems done.
2024-11-05 21:09:16 UTC [error] YoutubeAPI: Got error 400 when requesting /youtubei/v1/browse
2024-11-05 21:09:16 UTC [error] YoutubeAPI: Request contains an invalid argument.
2024-11-05 21:09:16 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" => "...."}}, "continuation" => "..."}
Exception: Could not extract JSON. Youtube API returned error 400 with message:<br>"Request contains an invalid argument." (InfoException)
  from /usr/share/crystal/src/io/buffered.cr:265:5 in '_post_json'
  from src/invidious/channels/videos.cr:149:22 in 'get_60_livestreams:continuation:sort_by'
  (...)
2024-11-05 21:09:17 UTC [warn] i18n: Missing translation key "Could not extract JSON. Youtube API returned error 400 with message:<br>"Request contains an invalid argument.""
2024-11-05 21:09:17 UTC [info] 500 GET /channel/UCpDJl2EmP7Oh90Vylx0dZtA/streams 1225.56ms

Version: 2024.08.26-4782a67

@SaltireSoul
Copy link

this effects all channels, not just the livestreams section now.

@davidosdr

This comment has been minimized.

@unixfox unixfox changed the title [Bug] Sorting channel by livestreams returns error 400, "Request contains an invalid argument." [Bug] "Request contains an invalid argument." when going to channels Nov 6, 2024
@Greenpickles987

This comment has been minimized.

@Fijxu
Copy link
Contributor

Fijxu commented Nov 7, 2024

This also breaks new subscriptions btw!
image

@Tha14

This comment has been minimized.

@d3npa
Copy link

d3npa commented Nov 7, 2024

Same problem here

I'm running the latest docker image from quay.io/invidious/invidious:latest-arm64

I noticed that while loading a channel URL without URI params gives this error, somehow for one channel my browser had a ?continuation= param saved and this one refreshes fine. I can even press "Next page" to see older videos and that loads too. The continuation value is 1508 bytes long and only works for this channel, and I don't know when or how it got set

/channel/UCH4BNI0-FOK2dMXoFtViWHw?continuation=4qmFsgLgCBIYVUNINEJOSTAtRk9LMmRNWG9GdFZpV0h3GpQIOGdhR0JocURCbnFBQmdyNUJRclFCVUZrY2tnelRGQjNlWGcwU3paeVQwTldTRVJFV2xaTmNYTTFjbFZvZVdWNlMwMVF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pKU1UxRlJXbEJVY2xOcGVVVnBZVGR2WmtONmVHaGhha3hqZFRSTlZVWkxiSFZ2T0c5VU0xOW1TbmRvWW5sS05XeG9UMHRJU2poelpERk9VSFZhVlhVMmEwWlRiVTUzYkUxQk5YTlZRVnAyUW5aYU0wMVRNRmcyYWs5TGRWTXlaUklrTURBd01EQXdNREF0TURBd01DMHdNREF3TFRBd01EQXRNREF3TURBd01EQXdNREF3R0FFZ0JBJTNEJTNEmgIsYnJvd3NlLWZlZWRVQ0g0Qk5JMC1GT0syZE1Yb0Z0VmlXSHd2aWRlb3MxMDI%253D

@Tha14
Copy link

Tha14 commented Nov 7, 2024

Same problem here

I'm running the latest docker image from quay.io/invidious/invidious:latest-arm64

I noticed that while loading a channel URL without URI params gives this error, somehow for one channel my browser had a ?continuation= param saved and this one refreshes fine. I can even press "Next page" to see older videos and that loads too. The continuation value is 1508 bytes long and only works for this channel, and I don't know when or how it got set

/channel/UCH4BNI0-FOK2dMXoFtViWHw?continuation=4qmFsgLgCBIYVUNINEJOSTAtRk9LMmRNWG9GdFZpV0h3GpQIOGdhR0JocURCbnFBQmdyNUJRclFCVUZrY2tnelRGQjNlWGcwU3paeVQwTldTRVJFV2xaTmNYTTFjbFZvZVdWNlMwMVFWMHBTZVRkMlVXTTFXbGhHTjFOWk5VUkpRbTV6VDJab0xYWlNiVVZ2YzE5RVIwcDBkMWhyZWpnNFFXRmFTMDQyT0U1c2MweGpjRVpMYWpGYU9HZGFOM1J6TkZaMVdGQmpZMVJQY1hOdE1GbHBObGQwWkU5WE1uVnBiMDVSWW5OM2VHTlBOR2h5YjI5M2RWcG5WR0pQU0hCb1dWZ3hOa1pGUzB4VGVVTTJlbXA0VEV0WFZrZHZRbXBYWmsxUU9HTjRkVmxSVW5sQ1ZUbHRWa1Z4YmpsdGNqSjRZVTFzVTA1NmRtSTRkMlJCWDBsck1rc3RWWFo0YkhNdGQwaFBjMFo2U2toVFp6TnFTSFZsTW5aT1ptSjZlV0UyU3pjM1VEWnNNMU01VWpSSWJsbHhUVTVpVTJsTWJqZFdPQzFOVjJabWJUQmFiSEV0UlY5eVdWQmxNemhKTjFVMVQxQllaMjVsYnpaWlYxazFiMHRRUVVsWFZrRnBabkYxVm1relJrNVVSRmhCUVZGSFltWnZObXRCYlRSNmQwWTJia3BwU1RSWU9ERk5VRXRFV2xwR2MxWkJOMkk0T0RCUmMwaFhWamRuTmxaaWFFMVVlRXBVYTBGM1pUTlZaVTF1ZG1aa2RXOVdhakJvV0ZnNFRTMVdWRmRvU1ZsM1MyWmZOMDFqUWs5Q01uTjRSbE5JVmpCUU9HTjBObUp0VEZselNIUjBSSGRMUkVaeFRsZHlaa1JaU0RNMk1GRXpRVU5VU25SMFNWcGhkRVl6WlRjeFZHbFVZMkZaZEhKelZuUnZabXN0WkRKSlVYbHZUbkptWnpKYU5WVnhXWEp1VUVsZlRrVlRkblJvUTFsbk1uaHJSMWhJWmsxeFgxQlFPVFF0Vmw5NlFXRmFjR3BvYldob1oxUnFjekZMYm10c09GSTFhVlp3TldSbVdtZHphVkJKTFhKVGJHRkxWSEpPVFRWR1dVNWZRbXBZVjNCZlNXMVFXV2h1YmkxS1RrZE5WbnB4ZHpsVGMyUk5aRzkyYWpkT1ZqUlZVREF0VmpKU1UxRlJXbEJVY2xOcGVVVnBZVGR2WmtONmVHaGhha3hqZFRSTlZVWkxiSFZ2T0c5VU0xOW1TbmRvWW5sS05XeG9UMHRJU2poelpERk9VSFZhVlhVMmEwWlRiVTUzYkUxQk5YTlZRVnAyUW5aYU0wMVRNRmcyYWs5TGRWTXlaUklrTURBd01EQXdNREF0TURBd01DMHdNREF3TFRBd01EQXRNREF3TURBd01EQXdNREF3R0FFZ0JBJTNEJTNEmgIsYnJvd3NlLWZlZWRVQ0g0Qk5JMC1GT0syZE1Yb0Z0VmlXSHd2aWRlb3MxMDI%253D

Yes, the continuation parameter is set when you've pressed the button to see the next page. In my case, I have a couple of app tabs with the continuation parameter set BUT I still receive the same error.

@unixfox
Copy link
Member

unixfox commented Nov 7, 2024

Like with every other bug, please comment only if you have something new to bring 🙏. Thank you!

@just-for-death

This comment has been minimized.

@barbosaaob

This comment was marked as outdated.

@UltraBlackLinux

This comment was marked as resolved.

@unixfox

This comment was marked as resolved.

@UltraBlackLinux

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet