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]: VideoUnavailableException even though the video is available on youtube #323

Open
5 tasks done
spiderion opened this issue Dec 30, 2024 · 9 comments
Open
5 tasks done
Labels
bug Something isn't working

Comments

@spiderion
Copy link

What happened?

VideoUnavailableException: Video 'YQHsXMglC9A' is unavailable
In most cases, this error indicates that the video doesn't exist, is private, or has been taken down.
If you can however open this video in your browser in incognito mode, it most likely means that YouTube changed something, which broke this library.
Please report this issue on GitHub in that case.

Stacktrace / error logs.

VideoUnavailableException: Video 'YQHsXMglC9A' is unavailable
In most cases, this error indicates that the video doesn't exist, is private, or has been taken down.
If you can however open this video in your browser in incognito mode, it most likely means that YouTube changed something, which broke this library.
Please report this issue on GitHub in that case.

Package (youtube_explode_dart) version

2.3.6

Checklist

  • I have provided a descriptive title
  • I have searched the issues of this repository and believe that this is not a duplicate
  • I have tested with the latest version of the library
  • (If relevant) I can open the video/playlist in a incognito/private window without being logged in.
  • I have sponsored the project

Additional notes

No response

@spiderion spiderion added the bug Something isn't working label Dec 30, 2024
@emreozdemir9
Copy link

Same problem, when 5-10 min later giving this error. Can anyone help us?

@Purehi
Copy link

Purehi commented Jan 3, 2025

same issue

@anandssm
Copy link

i get this error if when i use mobile data.

@raulmabe-labhouse
Copy link

raulmabe-labhouse commented Jan 24, 2025

We have the same issue.

For me it works well when I am on Wifi, but throws exception when I am on mobile data.
However, for a coworker, it works well on mobile data and throws exception on Wifi 😕

We noticed this video is a live that turned into a video 5 hours ago... so this may be the issue

Video 'an-ogV9u0kw' is unavailable
In most cases, this error indicates that the video doesn't exist, is private, or has been taken down.
If you can however open this video in your browser in incognito mode, it most likely means that YouTube changed something, which broke this 
Please report this issue on GitHub in that case.)

@Hexer10
Copy link
Owner

Hexer10 commented Jan 25, 2025

I'm not able to reproduce this issues, often youtube implements some features only in certain geographical areas, try to enable verbose logging and send the output here.

// Before any YoutubeExplode code
Logger.root.level = Level.FINER;
Logger.root.onRecord.listen((e)  {
  print(e);
  if (e.error != null) {
   print(e.error);
   print(e.stackTrace);
  }
});

@usilitel
Copy link

usilitel commented Feb 4, 2025

I'm not able to reproduce this issues, often youtube implements some features only in certain geographical areas, try to enable verbose logging and send the output here.

// Before any YoutubeExplode code
Logger.root.level = Level.FINER;
Logger.root.onRecord.listen((e) {
print(e);
if (e.error != null) {
print(e.error);
print(e.stackTrace);
}
});


I/flutter (27480): [FINE] YoutubeExplode.HttpClient: Sending request: GET https://www.youtube.com/watch?v=i2mV0LApDTA&bpctr=9999999999&has_verified=1&hl=en
I/flutter (27480): [FINE] YoutubeExplode.HttpClient: Sending request: GET https://www.youtube.com/watch?v=i2mV0LApDTA&bpctr=9999999999&has_verified=1&hl=en
I/flutter (27480): [FINE] YoutubeExplode.HttpClient: Sending request: GET https://www.youtube.com/watch?v=i2mV0LApDTA&bpctr=9999999999&has_verified=1&hl=en
I/flutter (27480): [FINE] YoutubeExplode.HttpClient: Sending request: GET https://www.youtube.com/watch?v=i2mV0LApDTA&bpctr=9999999999&has_verified=1&hl=en
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request headers: {User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.18 Safari/537.36, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, Accept-Language: en-us,en;q=0.5, Sec-Fetch-Mode: navigate, Cookie: PREF=hl=en&tz=UTC; SOCS=CAI; GPS=1}
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request headers: {User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.18 Safari/537.36, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, Accept-Language: en-us,en;q=0.5, Sec-Fetch-Mode: navigate, Cookie: PREF=hl=en&tz=UTC; SOCS=CAI; GPS=1}
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request headers: {User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.18 Safari/537.36, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, Accept-Language: en-us,en;q=0.5, Sec-Fetch-Mode: navigate, Cookie: PREF=hl=en&tz=UTC; SOCS=CAI; GPS=1}
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request body:
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request body:
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request body:
I/flutter (27480): [WARNING] YoutubeExplode.Retry: Retrying after exception: VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): #0      WatchPage.get.<anonymous closure> (package:youtube_explode_dart/src/reverse_engineering/pages/watch_page.dart:169:9)
I/flutter (27480): [WARNING] YoutubeExplode.Retry: Retrying after exception: VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): #0      WatchPage.get.<anonymous closure> (package:youtube_explode_dart/src/reverse_engineering/pages/watch_page.dart:169:9)
I/flutter (27480): [WARNING] YoutubeExplode.Retry: Retrying after exception: VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): #0      WatchPage.get.<anonymous closure> (package:youtube_explode_dart/src/reverse_engineering/pages/watch_page.dart:169:9)
I/flutter (27480): [WARNING] YoutubeExplode.Retry: Retrying after exception: VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): #0      WatchPage.get.<anonymous closure> (package:youtube_explode_dart/src/reverse_engineering/pages/watch_page.dart:169:9)
I/flutter (27480): [FINE] YoutubeExplode.HttpClient: Sending request: GET https://www.youtube.com/watch?v=i2mV0LApDTA&bpctr=9999999999&has_verified=1&hl=en
I/flutter (27480): [FINE] YoutubeExplode.HttpClient: Sending request: GET https://www.youtube.com/watch?v=i2mV0LApDTA&bpctr=9999999999&has_verified=1&hl=en
I/flutter (27480): [FINE] YoutubeExplode.HttpClient: Sending request: GET https://www.youtube.com/watch?v=i2mV0LApDTA&bpctr=9999999999&has_verified=1&hl=en
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request headers: {User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.18 Safari/537.36, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, Accept-Language: en-us,en;q=0.5, Sec-Fetch-Mode: navigate, Cookie: PREF=hl=en&tz=UTC; SOCS=CAI; GPS=1}
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request headers: {User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.18 Safari/537.36, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, Accept-Language: en-us,en;q=0.5, Sec-Fetch-Mode: navigate, Cookie: PREF=hl=en&tz=UTC; SOCS=CAI; GPS=1}
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request headers: {User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.18 Safari/537.36, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, Accept-Language: en-us,en;q=0.5, Sec-Fetch-Mode: navigate, Cookie: PREF=hl=en&tz=UTC; SOCS=CAI; GPS=1}
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request body:
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request body:
I/flutter (27480): [FINER] YoutubeExplode.HttpClient: Request body:
I/flutter (27480): [WARNING] YoutubeExplode.Retry: Retrying after exception: VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): #0      WatchPage.get.<anonymous closure> (package:youtube_explode_dart/src/reverse_engineering/pages/watch_page.dart:169:9)
I/flutter (27480): [WARNING] YoutubeExplode.Retry: Retrying after exception: VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): #0      WatchPage.get.<anonymous closure> (package:youtube_explode_dart/src/reverse_engineering/pages/watch_page.dart:169:9)
I/flutter (27480): [WARNING] YoutubeExplode.Retry: Retrying after exception: VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): #0      WatchPage.get.<anonymous closure> (package:youtube_explode_dart/src/reverse_engineering/pages/watch_page.dart:169:9)
I/flutter (27480): [WARNING] YoutubeExplode.Retry: Retrying after exception: VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): #0      WatchPage.get.<anonymous closure> (package:youtube_explode_dart/src/reverse_engineering/pages/watch_page.dart:169:9)
I/flutter (27480): [WARNING] YoutubeExplode.Retry: Retrying after exception: VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): VideoUnavailableException: Video 'i2mV0LApDTA' is unavailable
I/flutter (27480): #0      WatchPage.get.<anonymous closure> (package:youtube_explode_dart/src/reverse_engineering/pages/watch_page.dart:169:9)

@Hexer10
Copy link
Owner

Hexer10 commented Feb 5, 2025

@usilitel thanks for the logs, but unfortunately I still cannot reproduce it, on my end it seems to work fine:

  final yt = YoutubeExplode();
  final manifest = await yt.videos.streams.getManifest('i2mV0LApDTA');
  print(manifest);
  yt.close();
it prints the full manifest
format code  extension     resolution  quality       bitrate         size           codecs         info           
233          m3u8          audio only                ~47.65 Kbit/s   ~3.53 MB                      
139          mp4           audio only                49.28 Kbit/s    3.53 MB        mp4a.40.5      
249          webm          audio only                61.06 Kbit/s    3.90 MB        opus           
250          webm          audio only                78.32 Kbit/s    5.06 MB        opus           
234          m3u8          audio only                ~126.45 Kbit/s  ~9.38 MB                      
140          mp4           audio only                127.93 Kbit/s   9.38 MB        mp4a.40.2      
251          webm          audio only                151.79 Kbit/s   9.83 MB        opus           
278          webm          256x144     144p30        101.28 Kbit/s   6.43 MB        vp09.00.11.08  video only     
394          mp4           256x144     144p30        102.70 Kbit/s   4.53 MB        av01.0.00M.08  video only     
602          m3u8          256x144     144p15        ~133.05 Kbit/s  ~2.01 MB       vp09.00.10.08,mp4a.40.5  video only     
603          m3u8          256x144     144p30        ~158.09 Kbit/s  ~6.43 MB       vp09.00.11.08,mp4a.40.5  video only     
160          mp4           256x144     144p30        208.24 Kbit/s   5.41 MB        avc1.4D400C              video only     
269          m3u8          256x144     144p30        ~270.40 Kbit/s  ~5.41 MB       avc1.4D400C,mp4a.40.5    video only     
395          mp4           426x240     144p30        225.21 Kbit/s   8.27 MB        av01.0.00M.08            video only     
242          webm          426x240     144p30        243.35 Kbit/s   12.23 MB       vp09.00.20.08            video only     
604          m3u8          426x240     144p30        ~307.27 Kbit/s  ~12.23 MB      vp09.00.20.08,mp4a.40.5  video only     
133          mp4           426x240     144p30        484.31 Kbit/s   9.34 MB        avc1.4D4015              video only     
229          m3u8          426x240     144p30        ~560.27 Kbit/s  ~9.34 MB       avc1.4D4015,mp4a.40.5    video only     
396          mp4           640x360     360p30        418.88 Kbit/s   16.77 MB       av01.0.01M.08            video only     
243          webm          640x360     360p30        460.76 Kbit/s   21.33 MB       vp09.00.21.08            video only     
605          m3u8          640x360     360p30        ~618.12 Kbit/s  ~21.33 MB      vp09.00.21.08,mp4a.40.2  video only     
134          mp4           640x360     360p30        893.21 Kbit/s   17.31 MB       avc1.4D401E              video only     
230          m3u8          640x360     360p30        ~1.05 Mbit/s    ~17.31 MB      avc1.4D401E,mp4a.40.2    video only     
397          mp4           854x480     480p30        735.44 Kbit/s   28.70 MB       av01.0.04M.08            video only     
244          webm          854x480     480p30        766.04 Kbit/s   32.79 MB       vp09.00.30.08            video only     
606          m3u8          854x480     480p30        ~938.67 Kbit/s  ~32.79 MB      vp09.00.30.08,mp4a.40.2  video only     
135          mp4           854x480     480p30        1.29 Mbit/s     26.17 MB       avc1.4D401F              video only     
231          m3u8          854x480     480p30        ~1.48 Mbit/s    ~26.17 MB      avc1.4D401F,mp4a.40.2    video only     
398          mp4           1280x720    720p30        1.34 Mbit/s     53.55 MB       av01.0.05M.08            video only     
247          webm          1280x720    720p30        1.44 Mbit/s     54.39 MB       vp09.00.31.08            video only     
609          m3u8          1280x720    720p30        ~1.65 Mbit/s    ~54.39 MB      vp09.00.31.08,mp4a.40.2  video only     
136          mp4           1280x720    720p30        2.30 Mbit/s     47.40 MB       avc1.4D401F              video only     
232          m3u8          1280x720    720p30        ~2.55 Mbit/s    ~47.40 MB      avc1.4D401F,mp4a.40.2    video only     
248          webm          1920x1080   1080p30       2.46 Mbit/s     105.64 MB      vp09.00.40.08            video only     
614          m3u8          1920x1080   1080p30       ~2.72 Mbit/s    ~105.64 MB     vp09.00.40.08,mp4a.40.2  video only     
399          mp4           1920x1080   1080p30       3.15 Mbit/s     101.40 MB      av01.0.08M.08            video only     
137          mp4           1920x1080   1080p30       4.22 Mbit/s     167.30 MB      avc1.640028              video only     
270          m3u8          1920x1080   1080p30       ~4.56 Mbit/s    ~167.30 MB     avc1.640028,mp4a.40.2    video only     
616          m3u8          1920x1080   1080p30       ~5.57 Mbit/s    ~275.71 MB     vp09.00.40.08,mp4a.40.2  video only    

Does it work with yt-dlp? If so can you send the full output of the command?

@usilitel
Copy link

usilitel commented Feb 6, 2025

@Hexer10 Right now, everything is working fine for me as well. This bug doesn't always appear.
Last time, the video on YouTube was playing, but youtube_explode_dart threw a VideoUnavailableException error. I didn't try downloading it with yt-dlp.
When the bug appears again, I'll report the results for yt-dlp.

However, there will be an issue with yt-dlp since the bug occurs on an Android phone, and I don't know how to run yt-dlp on the phone yet. I'll figure something out.

@tytydraco
Copy link

I just got this exception myself:

VideoUnavailableException: Video 'E-yqx75OXE0' is unavailable
In most cases, this error indicates that the video doesn't exist, is private, or has been taken down.
If you can however open this video in your browser in incognito mode, it most likely means that YouTube changed something, which broke this library.
Please report this issue on GitHub in that case.
#0      WatchPage.get.<anonymous closure> (package:youtube_explode_dart/src/reverse_engineering/pages/watch_page.dart:169)
<asynchronous suspension>
#1      retry (package:youtube_explode_dart/src/retry.dart:20)
<asynchronous suspension>
#2      VideoClient._getVideoFromWatchPage (package:youtube_explode_dart/src/videos/video_client.dart:38)
<asynchronous suspension>
#3      Downloader.download (package:meow_dart/src/downloader.dart:120)
<asynchronous suspension>
#4      DownloaderSpawner.spawnDownloader.<anonymous closure> (package:meow_dart/src/downloader_spawner.dart:99)
<asynchronous suspension>```

It only started happening several hundred video downloads into my playlist, and this error occured like 50 more times, with only a few breaks where videos were able to be downloaded again. Could it be rate limiting?

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
Development

No branches or pull requests

8 participants