Tyrrrz / Tyrrrz/YoutubeExplode

GetPlayerResponseForVisionOsAsync fails with 400 Bad Request on all videos

Open
#969 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug bug/caused by youtube
Dominant language
C#
Stars
3.7k
Forks
592
Avg merge
3h 4m
Merged PRs (30d)
1

Description

Version

YoutubeDownloader.win-x64

Environment

Windows 11 x64 bit

Steps to reproduce

I'm using YouTubeDownloader (latest CI build, win-x64). When I try to download ANY video (not just a specific one), I get the following error:

System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at YoutubeExplode.Videos.VideoController.GetPlayerResponseForVisionOsAsync(VideoId videoId, String visitorData, CancellationToken cancellationToken)
at YoutubeExplode.Videos. VideoController.GetPlayerResponseAsync(VideoId videoId, String signatureTimestamp, CancellationToken cancellationToken)
at YoutubeExplode.Videos.VideoController.GetPlayerResponseAsync(VideoId videoId, CancellationToken cancellationToken)
at YoutubeExplode.Videos.Streams.StreamClient.GetStreamInfosAsync(VideoId videoId, CancellationToken cancellationToken)
at YoutubeExplode.Videos.Streams.StreamClient.GetManifestAsync(VideoId videoId, CancellationToken cancellationToken)

Operating system: Windows 11, x64
I've tried several different videos, and they all fail with the same error.

Translated with DeepL.com (free version)

Details

I start the program manage to log in and I can open playlists and it shows me that I can download them but as soon as I want to download it the error message above shows up. When I want to download one single video (simple url for example "https://www.youtube.com/watch?v=gvU5V1ZALeI&list=PLVMjYEJplVtM&index=6" same error message pops up

Checklist
  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that this bug is reproducible on the latest version of the package
  • I have provided all the information needed to reproduce this bug as efficiently as possible
  • I have sponsored this project

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure while downloading any video and inspect the stack trace entry point, VideoController.GetPlayerResponseForVisionOsAsync. Trace how it is called by GetPlayerResponseAsync and StreamClient.GetStreamInfosAsync, then compare the request behavior with the reported 400 response. Done means video and playlist downloads no longer fail with this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, reverse-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.