Hexer10 / youtube_explode_dart

Dart library to interact with many Youtube APIs
https://pub.dev/packages/youtube_explode_dart
BSD 3-Clause "New" or "Revised" License
299 stars 122 forks source link

[BUG] Failed to perform an HTTP request to YouTube due to a fatal failure. #255

Closed ebenavidez closed 10 months ago

ebenavidez commented 12 months ago

Describe the bug The code was previously working but stopped. I keep getting this error, doesn't matter what video link I am using.

FatalFailureException: Failed to perform an HTTP request to YouTube due to a fatal failure. In most cases, this error indicates that YouTube most likely changed something, which broke the library. If this issue persists, please report it on the project's GitHub page. Request: get https://rr2---sn-jvhja5g3-hoaey.googlevideo.com/videoplayback?expire=1694703511&ei=N8sCZdCRGP6B9fwPw7-C2Aw&ip=136.158.122.141&id=o-AJ7fW9vTQhZbX9NLT9TdNIv4_0NseE6jZcdxKfhGcatB&itag=251&source=youtube&requiressl=yes&mh=yt&mm=31%2C29&mn=sn-jvhja5g3-hoaey%2Csn-jvhja5g3-hoay&ms=au%2Crdu&mv=m&mvi=2&pl=22&initcwndbps=1115000&spc=UWF9f7oxqugUiWXenZlFx3FZA2y10CgNJACsiRh10g&vprv=1&svpuc=1&mime=audio%2Fwebm&gir=yes&clen=18995083&dur=1506.061&lmt=1682258924306402&mt=1694681355&fvip=1&keepalive=yes&fexp=24007246&beids=24350018&c=ANDROID&txp=5532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgaBRiw0-PaSYtB9UGTtmNiRRQsJePUmNSaPn0FQo62w4CIQDW8VXHNPTR8kY9Tbcgr5Gf8yk1ORtGSTvqfUFrPf13xg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAL3aZU72JXosPK1JfRiM3nbuEvwsRDrX8z54wdv7VngjAiEAgUTYbGsdgT-rppsNR5D_lad4qJJgiiaQ0R1EZd-lPsE%3D&range=0-9898988 Response: (403)

To Reproduce @override Future downloadAudioFile( VideoData videoData, String saveTo, String filename) async {

try {
  final video = await client.videos.get(videoData.url);
  final manifest = await client.videos.streamsClient.getManifest(video.id);
  final streamInfo = manifest.audioOnly.withHighestBitrate();

  if (streamInfo != null) {
    var file = File("$saveTo/$filename.${streamInfo.container.name}");
    var fileStream = file.openWrite();

    var stream = client.videos.streamsClient.get(streamInfo);
    await stream.pipe(fileStream);

    await fileStream.flush();
    await fileStream.close();

    return "Downloaded to ${saveTo}";
  }
  throw const DownloadException("");

} catch (e) {
  throw const DownloadException("");
}

}

Enviroment: (please complete the following information):

pratapsinghshekhawatk commented 11 months ago

did find solution to this problem?

pratapsinghshekhawatk commented 11 months ago

@ebenavidez

ebenavidez commented 11 months ago

Not yet, unfortunately. Do you have any insights?

pratapsinghshekhawatk commented 11 months ago

@ebenavidez

@ebenavidez I also trying but no luck.

pratapsinghshekhawatk commented 11 months ago

@ebenavidez In older version there is speed issue, and in latest version this issue.

pratapsinghshekhawatk commented 11 months ago

@Hexer10 Please check this issue.

Hexer10 commented 11 months ago

A few questions, since neither me nor on the CI I could reproduce the issue.

Do you get this issue on every video? (If not please provide a video id which does).

Does this happen every tim le or does retrying help?

If possible provide your location, sometimes YouTube implements changes on to some countries.

I'm aware that sometimes for an unknown reason YouTube streams return 403 and a retrying mechanism is already implemented.

pratapsinghshekhawatk commented 11 months ago

A few questions, since neither me nor on the CI I could reproduce the issue.

Do you get this issue on every video? (If not please provide a video id which does).

Does this happen every tim le or does retrying help?

If possible provide your location, sometimes YouTube implements changes on to some countries.

I'm aware that sometimes for an unknown reason YouTube streams return 403 and a retrying mechanism is already implemented.

I'm from India, and facing this issue in all videos. 403 error in latest version. Version 1.10.8 is working but there is a speed issue which is fixed 1.12.4

pratapsinghshekhawatk commented 11 months ago

I'm using version 1.12.4 as my project is not null safe.

Hexer10 commented 11 months ago

A few questions, since neither me nor on the CI I could reproduce the issue. Do you get this issue on every video? (If not please provide a video id which does). Does this happen every tim le or does retrying help? If possible provide your location, sometimes YouTube implements changes on to some countries. I'm aware that sometimes for an unknown reason YouTube streams return 403 and a retrying mechanism is already implemented.

I'm from India, and facing this issue in all videos. 403 error in latest version. Version 1.10.8 is working but there is a speed issue which is fixed 1.12.4

Are you able to pinpoint the exact version when the issues appears? Also old versions are not supported so please try to provide a reproducible example using the latest version of the library

ebenavidez commented 11 months ago

A few questions, since neither me nor on the CI I could reproduce the issue.

Do you get this issue on every video? (If not please provide a video id which does).

Does this happen every tim le or does retrying help?

If possible provide your location, sometimes YouTube implements changes on to some countries.

I'm aware that sometimes for an unknown reason YouTube streams return 403 and a retrying mechanism is already implemented.

Sorry, I've been busy. I was using version ^1.12.4. It was happening on all of the videos, nothing helped. I will keep in mind the location constraints next time. The current version, ^2.0.2, fixed the issue I had. Thank you so much!

mini0555555 commented 9 months ago

anyone get the solution for this error?