Skip to content

Received an unexpected EOF or 0 bytes from the transport stream. (System.IO.IOException) #119

@Lilyy2565

Description

@Lilyy2565

Describe the bug

Downloading certain files throws Received an unexpected EOF or 0 bytes from the transport stream. (System.IO.IOException) before the download has finished. The dialog box opening also seems to freeze all other downloads in progress.

Steps to reproduce

  1. Download a file
  2. See error (only if the server reports too big a file size)

Expected behaviour

The download should be able to finish

Download Manager Version

Latest master branch (791b2f4)

Windows Version

Windows 11 Pro Insider Preview 22H2 23620.1000

Comments

Notes:

This could be fixed or worked around by catching the exception and for the specific "received EOF" exception still fail the download, but restart the download in safe mode. This could fix the problem

Full Exception:

 Received an unexpected EOF or 0 bytes from the transport stream. (System.IO.IOException)
   at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](TIOAdapter adapter)
   at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](TIOAdapter adapter, Memory`1 buffer)
   at System.Net.Http.HttpConnection.ReadAsync(Memory`1 destination)
   at System.Net.Http.HttpConnection.ContentLengthReadStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
   at DownloadManager.Download.DownloadSegment.DownloadFileSegment(DownloadSegmentID id, DownloadProgress window, Stream downloadStream, Stream outputStream, Int64 contentLength, Int64 totalLength, String location, BetterProgressBar progressBar, CancellationToken token, DownloadProgressUpdater progressUpdater) in E:\Download Manager\Download Manager\Download\DownloadSegment.cs:line 27
   at DownloadManager.DownloadProgress.DownloadFileAsync(Uri uri, CancellationToken cancellationToken, Action`3 progressCallback, BetterProgressBar progressBar) in E:\Download Manager\Download Manager\DownloadProgress.cs:line 1528
   at DownloadManager.DownloadProgress.StartNormalDownload() in E:\Download Manager\Download Manager\DownloadProgress.cs:line 1282

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: highIssue or pull request is on high priority

    Type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions