New issue
Advanced search Search tips

Issue 922021 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 918944
Owner: ----
Closed: Jan 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Missing end of file when downloading via ReadableStream

Reported by mrsk...@gmail.com, Jan 15

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Steps to reproduce the problem:
1. Go to https://stat-info.cz/chrome-sw-readablestream.html
2. Click the Download button

What is the expected behavior?
1. A ServiceWorker is registered to intercept requests to /download-sw-readablestream
2. Chrome navigates to this URL
3. Fetch event occurs in the ServiceWorker and responds with a ReadableStream
4. Chrome calls ReadableStream's pull method which returns a Promise
5. 16MB chunk is downloaded and enqueued to the ReadableStream
6. ReadableStream is closed and Promise is resolved
7. 16MB file (16777216 bytes) is saved to disk as "file.bin"

What went wrong?
Downloaded file is sometimes missing several (4-20) kilobytes at the end. Here are some tests:

Windows 7 64bit:
71.0.3578.98 - 11 files corrupted, 9 files OK
70.0.3538.77 - 0 files corrupted, 20 files OK
62.0.3202.94 - 0 files corrupted, 20 files OK

Windows 10 64bit:
71.0.3578.98 - 0 files corrupted, 20 files OK
71.0.3578.80 - 0 files corrupted, 20 files OK

Ubuntu 16.04.5 64bit:
71.0.3578.98 - 20 files corrupted, 0 files OK

MacOS 10.14.2:
71.0.3578.98 - 20 files corrupted, 0 files OK

It looks like Chrome's download manager gets wrong file size. See attached screenshot from Windows 7. For corrupted files I could see 15.9MB/15.9MB in download manager and 16.0MB/16.0MB for the good ones.

Did this work before? Yes 70.0.3538.77

Chrome version: 71.0.3578.98  Channel: stable
OS Version: Ubuntu 16.04.5
Flash Version:
 
chrome-71-0-3578-98-win7.png
1.8 KB View Download
Components: -Blink Blink>ServiceWorker
Labels: Needs-Feedback
This is likely a dupe of  bug 918944 .  Can you test in chrome 72 to see if its fixed for you there?
Version 72 looks good on Win7, MacOS and Linux. Thanks!
Project Member

Comment 3 by sheriffbot@chromium.org, Jan 15

Cc: wanderview@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Mergedinto: 918944
Status: Duplicate (was: Unconfirmed)
Thanks for testing.  I'll dupe this over to the other bug.

Note, the work around until 72 ships is to add a "X-Content-Type-Options: nosniff" header to the download response.

Sign in to add a comment