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
322 stars 141 forks source link

Is the library broken? #167

Closed One-djey closed 3 years ago

One-djey commented 3 years ago

Discussed in https://github.com/Hexer10/youtube_explode_dart/discussions/166

Originally posted by **One-djey** August 31, 2021 Hi all! I just started a new flutter project and I use this library version _1.9.10_ to download audio from youtube videos. But it seems that something went wrong. I stick to the demo to download the [U6n2NcJ7rLc](https://www.youtube.com/watch?v=U6n2NcJ7rLc) using the `download(String id)` function from [this example](https://github.com/Hexer10/youtube_explode_dart/blob/master/example/video_download.dart). And I got the following error: ``` E/flutter ( 8964): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: FatalFailureException: Failed to perform an HTTP request to YouTube due to a fatal failure. E/flutter ( 8964): In most cases, this error indicates that YouTube most likely changed something, which broke the library. E/flutter ( 8964): If this issue persists, please report it on the project's GitHub page. E/flutter ( 8964): Request: GET https://youtube.com/get_video_info?video_id=U6n2NcJ7rLc&el=embedded&eurl=https%3A%2F%2Fyoutube.googleapis.com%2Fv%2FU6n2NcJ7rLc&hl=en&html5=1&c=TVHTML5&cver=6.20180913 E/flutter ( 8964): Response: (410) E/flutter ( 8964): E/flutter ( 8964): #0 YoutubeHttpClient._validateResponse (package:youtube_explode_dart/src/reverse_engineering/youtube_http_client.dart:49:7) E/flutter ( 8964): #1 YoutubeHttpClient.getString (package:youtube_explode_dart/src/reverse_engineering/youtube_http_client.dart:59:7) E/flutter ( 8964): E/flutter ( 8964): #2 VideoInfoResponse.get. (package:youtube_explode_dart/src/reverse_engineering/responses/video_info_response.dart:73:17) E/flutter ( 8964): E/flutter ( 8964): #3 retry (package:youtube_explode_dart/src/retry.dart:17:14) E/flutter ( 8964): E/flutter ( 8964): #4 VideoClient._getVideoFromWatchPage (package:youtube_explode_dart/src/videos/video_client.dart:32:9) E/flutter ( 8964): ``` Does anyone have a solution?
Hexer10 commented 3 years ago

Please fill in the bug request template.

Besides that this bug was fixed long ago, must use the latest version of the package.

One-djey commented 3 years ago

Sorry, but what's the bug request template? I tried to use the last version but I got this error:

Because every version of flutter from sdk depends on meta 1.3.0 and json_annotation >=4.1.0 depends on meta ^1.4.0, flutter from sdk is incompatible with json_annotation >=4.1.0.
And because youtube_explode_dart >=1.10.0 depends on freezed_annotation ^0.14.3 which depends on json_annotation ^4.1.0, flutter from sdk is incompatible with youtube_explode_dart >=1.10.0.
So, because my_app depends on both flutter any from sdk and youtube_explode_dart ^1.10.6, version solving failed.

That's why I tried an earlier version.

Hexer10 commented 3 years ago

Check the pinned issue you need to add an entry to the override_dependencies in the pubspec.yaml