lay295 / TwitchDownloader

Twitch VOD/Clip Downloader - Chat Download/Render/Replay
MIT License
2.78k stars 261 forks source link

`Name or service not known` when trying to download Twitch VOD #318

Closed andymcblane closed 2 years ago

andymcblane commented 2 years ago

Checklist

Describe your issue here

Hello. I am getting a System.Net.WebException when running a simple download such as

./TwitchDownloaderCLI -m VideoDownload --id 1474866561 -o out.mp4

Steps taken to install:

Unhandled exception. System.AggregateException: One or more errors occurred. (Name or service not known Name or service not known) ---> System.Net.WebException: Name or service not known Name or service not known ---> System.Net.Http.HttpRequestException: Name or service not known ---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name or service not known at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at System.Net.HttpWebRequest.SendRequest() at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result) at System.Net.WebClient.GetWebResponseTaskAsync(WebRequest request) at System.Net.WebClient.DownloadBitsAsync(WebRequest request, Stream writeStream, AsyncOperation asyncOp, Action`3 completionDelegate) at TwitchDownloaderCore.VideoDownloader.DownloadAsync(IProgress`1 progress, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at TwitchDownloaderCLI.Program.DownloadVideo(Options inputOptions) at TwitchDownloaderCLI.Program.Main(String[] args) Aborted

I am running UnRAID, and this is on the host OS, so I thought I'd try one of my Ubuntu VMs (on the same machine), but then I get

Unhandled exception. System.AggregateException: One or more errors occurred. (Resource temporarily unavailable Resource temporarily unavailable) ---> System.Net.WebException: Resource temporarily unavailable Resource temporarily unavailable ---> System.Net.Http.HttpRequestException: Resource temporarily unavailable ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at System.Net.HttpWebRequest.SendRequest() at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result) at System.Net.WebClient.GetWebResponseTaskAsync(WebRequest request) at System.Net.WebClient.DownloadBitsAsync(WebRequest request, Stream writeStream, AsyncOperation asyncOp, Action`3 completionDelegate) at TwitchDownloaderCore.VideoDownloader.DownloadAsync(IProgress`1 progress, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at TwitchDownloaderCLI.Program.DownloadVideo(Options inputOptions) at TwitchDownloaderCLI.Program.Main(String[] args) Aborted (core dumped)

I have verified the following as well:

Any further thoughts, troubleshooting steps or ideas would be greatly appreciated - thanks!

andymcblane commented 2 years ago

No issues here image

andymcblane commented 2 years ago

Have also verified -m ChatDownload works

Zibbp commented 2 years ago

I'm not too familiar with C# but it appears that it can't connect an external resource? On the Unraid host can you try downloading the m3u8 playlist and a .ts segment of the above VOD?

wget https://d2vjef5jvl6bfs.cloudfront.net/b09b32d046958ccc3162_kitboga_39703848617_1651678003/chunked/index-dvr.m3u8

wget https://d2vjef5jvl6bfs.cloudfront.net/b09b32d046958ccc3162_kitboga_39703848617_1651678003/chunked/0.ts

Does it start downloading the VOD or instantly throw the error after running the command?

andymcblane commented 2 years ago

image Working now, not sure what changed. Suspect local network issues so will close, but may reopen

@Zibbp was not able to test the wgets in broken state sorry