Comments (21)
Hi @fengyuan213,
Thanks for reporting the issue.
I check your download URL and sample, but that's work correctly and I can download your files successfully! Of course, this link has some server-side problems such as disconnecting some times and I tested by some downloaders like IDM and all of them have this problem when downloading from.
And I check this link and our project works exactly with the ReadAsync
command instead of the ReadToEnd
, But I change some request options to improve the stability and after the test I released a new version.
from downloader.
@fengyuan213 I released a new version 1.0.9, please test that.
from downloader.
Hello, I tested with the new version again just now. .The good news is that It can download succeed sometimes with parallel downloads option changed to false, however, When I try to download the file in parallel. Then it throws the same error at the download chunks method. However, I don't really think there is any server-side issues because the link I use to test download is from a known CDN network provider so... I checked with my link through IDM multi-thread downloading and it just works perfectly without any pieces of the issue. I have no idea why that is happening. Maybe it an idea to automatically retry to download the same chunk data if this exception occurred to try to avoid the issue.
Also, downloading sometimes stack. From the title bar of the console, it is able to see it's on 29.671% progress of downloading. The things are the progress never gets changed even for half an hour. Maybe regularly check if the download thread still alive...
Please help
from downloader.
Update, the ParallelDownload = false option could let me download successful but it only for some time. There is a chance like 1/3 download failed and thows same exception as before. See picture belovw
from downloader.
By the way, I am using WinForm in the Console Application by setting STAThread Attribute. Is that the case?
from downloader.
@fengyuan213 No, your application is fine and no problem. My downloader library has no dependency on your or any other project.
In this case, I have to work harder to find out why. If you have any information about this problem, be sure to mention it here.
Thanks
from downloader.
Ok , Please update the version so I can test it.
from downloader.
Today, I had another download issue with the same error message : Unable to read data from the transport connection: the connection was closed
The Client Instance hasn't disposed of it when downloading data.
It is very strange in this case because this function was worked perfectly.....The network section seems to be less stability when I changed the project to STAThread....
from downloader.
Hello there, I have a super super good news, After I testing between net core and framework for lots of time. I figured it out why. The solution is so simple. When downloading chunkes, the downloader catches webexception and the following.
e.Source == "System.Net.Http" ||
e.Source == "System.Net.Sockets" ||
e.Source == "System.Net.Security" ||
e.InnerException is SocketException)
In the Framework I don't know how but "Unable to read data from the transport connection " is a part of IOException Instead of any of them above. Simplify just append "e is IOException" and problem solved. Please share your throughts becuase I am not too sure if it is a good way but it solved my problem.
from downloader.
from downloader.
Also, The CacheInMemory =False mode is not working which means all downloads are forced to cacheinmemory
from downloader.
@fengyuan213 Thank you for your follow-up. The IOException
is very general and I can't catch that because maybe the exception has been caused for many reasons.
I have made changes to the source that I hope will solve your problems. You can see these changes in version 1.2.
from downloader.
New version (1.2) released. Please test with that to sure solved this issue or not.
The caching mode also fixed in this version.
from downloader.
@fengyuan213 have you tested this issue in the new version?
from downloader.
Hello,
I tested the new version today. It is great to have a new feature like speed limit. However, the problem still exist......
from downloader.
Hello, I think it is kinds of useful update...The post above uses Downloader.Sample's default configuration with KeepAlive=false
The error below occurs when I set to the KeepAlive opt = true.
Configuration:
Stacktrace:
" at System.IO.Stream.BeginReadInternal(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state, Boolean serializeAsynchronously)\r\n at System.IO.Stream.BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state)\r\n at System.IO.Stream.<>c.b__43_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, Object state)\r\n at System.Threading.Tasks.TaskFactory1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func
5 beginMethod, Func`3 endMethod)\r\n at System.IO.Stream.BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count)\r\n at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)\r\n at Downloader.DownloadService.d__45.MoveNext() in C:\Users\Fengyuan\source\repos\Downloader\src\Downloader\DownloadService.cs:line 285\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.GetResult()\r\n at Downloader.DownloadService.d__44.MoveNext() in C:\Users\Fengyuan\source\repos\Downloader\src\Downloader\DownloadService.cs:line 228"
from downloader.
@fengyuan213 some servers does not support KeepAlive=true option, so I set default value to false.
In the first error, every time I check that, I could see no error! Is this the download link?
"http://resources.downloads.pokecity.club/2020.rar"
from downloader.
Yep......
from downloader.
The link above u might not able to download in your area.. try this one:
http://test.download.pokecity.club/2020.rar
from downloader.
@fengyuan213 I released the new version v1.5.0. Please check this version. And if you have still this problem, please send me a complete exception data as TEXT
or JSON
to check exception source and types.
Thanks
from downloader.
@fengyuan213 Was this problem solved with the new version?
from downloader.
Related Issues (20)
- The calling thread cannot access this object because another thread owns it HOT 1
- ExceptionHelper.CertificateValidationCallBack() is never called when compiling for android HOT 3
- Chunk displaying no progress yet still downloads. HOT 1
- No error when server responds with 404 HOT 1
- Occasional resume error and inaccurate download progress HOT 2
- Whether the download can be resumed from where the last download was not completed HOT 3
- ipv6 Download error the ssl connection could not be established, see inner exception HOT 2
- RobiniaDocs API Explorer
- how to download stream or api link?
- Large file download blocks other download tasks. HOT 3
- Attempting to download the same file to the local directory with same name doesnt overwrite/replace HOT 2
- Downloader support socks5 proxy HOT 3
- getting error when download completed! HOT 11
- The 67th Line in this file“Downloader/src/Downloader /ChunkDownloader.cs ” is not need HOT 1
- The CancelTaskAsync interface of IDownloadService causes the program to freeze. HOT 1
- Inquiry Regarding Repository Usage for Efficient Download of Small Files in .NET HOT 1
- I need to implement happy eyeballs for IPV4 IPV6 dual stack protocol HOT 2
- Resume download after restart program
- DownloadStatus is Failed but no exception is thrown HOT 2
- README is a bit misleading about Content-Length for getting file length
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from downloader.