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

Video cannot be retrieved - UnavailableStreamException #289

Closed
kizuki1749 opened this issue Sep 26, 2024 · 11 comments
Closed

Video cannot be retrieved - UnavailableStreamException #289

kizuki1749 opened this issue Sep 26, 2024 · 11 comments

Comments

@kizuki1749
Copy link

In the latest version 3.2.5, it is no longer possible to retrieve videos from YouTube using GetAllVideosAsync().

An exception called UnavailableStreamException is thrown for all videos, and the message “Error caused by YouTube. (This video is not available)” is displayed.

I wonder if this is due to a change in YouTube's specifications.

スクリーンショット 2024-09-27 014121

@crazybmanp
Copy link

I am also getting this error

@MickeCast
Copy link

I was using an old version and I started getting the forbidden error, then I updated the nuget package for c# visual studio, and I started getting this same error (Error caused by Youtube.(This video is not available))), but when calling the GetVideo method:
var youTube = YouTube.Default; var video = youTube.GetVideo("https://www.youtube.com/watch?v=" + videoId);

It fails for any video id, but in my case I am testing with this id: S2tZS-vNMTM

Wondering if this is youtube changing something, or a just a bug on the library. @omansak any advice would be very appreciated.

Stacktrace:
at VideoLibrary.YouTube.<ParseVideos>d__9.MoveNext() at System.Linq.Enumerable.First[TSource](IEnumerable1 source)
at VideoLibrary.ServiceBase1.VideoSelector(IEnumerable1 videos)
at VideoLibrary.ServiceBase1.<GetVideoAsync>d__6.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()
at VideoLibrary.ServiceBase1.<GetVideoAsync>d__5.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at VideoLibrary.ServiceBase`1.GetVideo(String videoUri)
at d__19.MoveNext()

@hady-khann
Copy link

yt

i'm getting same error

@crazybmanp
Copy link

Gonna cross post this ticket from another repo, they had the same issue. The fix doesn't seem to work fully for them, but there could be something useful in this discussion. Tyrrrz/YoutubeExplode#817

@SteveW400
Copy link

I'm getting the same problem. On multiple files, the URLs work OK when pasted directly into a browser.
Two weeks ago, it worked OK. Since then, Widows has been updated including Edge and the WebView2 runtime. I don't see anything else that changed.

@ricovivid
Copy link

ricovivid commented Sep 29, 2024

I'm getting it on all youtube URLs as well. Was working a couple days ago. My program is a .NET MAUI app.

@kizuki1749
Copy link
Author

I tried testing the PR, but it still seems to be unable to retrieve the video.

@SteveW400
Copy link

SharpGrabber has the same problem dotnettools/SharpGrabber#99
Looks like something changed at YouTube.

@Aequitas00
Copy link
Contributor

When testing the pr do you all get the same error? When i made the change i tested in the libvideo Program file.

@SteveW400
Copy link

9/29/2024 4:39:33 PM Info Url = https://www.youtube.com/watch?v=WtkjyIaJDTE
9/29/2024 4:39:34 PM ERROR VideoLibrary.Exceptions.UnavailableStreamException: Error caused by Youtube.(This video is not available))
at VideoLibrary.YouTube.d__9.MoveNext()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source) at VideoLibrary.ServiceBase1.VideoSelector(IEnumerable1 videos) at VideoLibrary.ServiceBase1.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at VideoLibrary.ServiceBase1.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at VideoLibrary.ServiceBase1.GetVideo(String videoUri)
at SoundAnalysis.ImagingWhiteboard.Controls.YouTubeInputControl.YouTubeWebBrowser_SourceChanged(Object sender, CoreWebView2SourceChangedEventArgs e)

@omansak omansak mentioned this issue Oct 1, 2024
@omansak omansak closed this as completed Oct 1, 2024
@SteveW400
Copy link

omansak, thanks 3.2.6 works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants