Service Worker downloads being prematurely interrupted since 134.0.1
Categories
(Core :: DOM: Service Workers, defect, P3)
Tracking
()
People
(Reporter: vobruba.martin, Unassigned)
References
(Regression)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Steps to reproduce:
- Open this page: https://stat-info.cz/safari-sw-download-tests.html
- Click on any "Start download" button.
Bug reproduced on Windows, Mac and Linux. 134.0 version works fine. 134.0.1 is not working.
Actual results:
The download is automatically interrupted after a few chunks.
Expected results:
I expect sucessful (100%) download.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Service Workers' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 year ago
•
|
||
Is this possibly a regression from the streams stuff?
And did that one patch already fix this on Nightly?
Comment 3•1 year ago
|
||
(Initially s2, because this sounds like a regression)
Comment 4•1 year ago
|
||
This certainly is "stream is only owned by itself" type of code. One would imagine the JS engine would grab the pull function context while calling fetch() but we already got the answer "no". We should uplift bug 1941210 to stable too.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 5•1 year ago
|
||
I found this bug report after troubleshooting why downloads from Proton Drive were not working correctly for me, and I think this bug might be the root cause of my problems.
I contacted Proton's customer support, because I initially thought it was an issue with their web app. Following are my emails to their support, which I hope can shed some light on what this bug looks like to the user. I'm not affiliated with Proton in any way, other than using their services as a customer. I didn't include the links to the screen recordings or profiler captures, as they contain some sensitive information which I wouldn't like to put up on a public bug tracker, but if anyone from the Firefox development team is interested in, I can share them privately.
1. (me)
Hello,
I'm unable to download some of my files from Proton Drive. When I try and download one of my files (In this case, a Windows 11 ISO) the download seemingly finishes in the browser, but continues in the Proton Drive WebUI. The browser download always "finishes" at roughly 49.7 MB, even as the download continues in the WebUI. I have attached a link to a screen recording of the issue. I have also been able to replicate this issue on my other computer running Linux with the same version of Firefox.
<link to shared folder>
The screen recording was captured while using a fresh Firefox profile with no settings changed from their defaults.
I tried to work around the issue by making a shared link to the file, and downloading it through the shared link, but that hasn't fixed the issue.
2. (support)
Hello,
Thank you for contacting us.
Can you please provide us with more information so we can further investigate this?
Can you let us know if you are encountering this issue only with this specific file or with other files as well?
Would you consider trying with a different browser to see if you will experience the same issue?
https://proton.me/support/recommended-browsers
What exactly occurs when the download finishes? Are you encountering any error messages?
Can you also provide us with the logs from the download so we can check them?
You can find them by navigating to the Failed tab and clicking on the wrench icon as shown below.
Looking forward to your reply.
Kind regards,
NAME
Customer Support
Proton Mail
3. (me)
I'm able to replicate the issue on a clean profile in Firefox 134.0.1
(latest stable Firefox as of 20.1) on macOS and Linux. There are no logs
printed to the browser's debug console, and the issue always occurs
40-90mb into the download. It seems that every large file I've tried has
the same issue.
I'm unable to replicate this issue using Firefox Nightly 136.0a1
(2025-01-19) [Firefox Nightly is the development/testing version of
Firefox built every 12hrs] on either macOS or Linux, or Chromium
132.0.6834.83 on either macOS or Linux.
Please let me know if you have any more questions.
4. (support)
Hello,
Thank you for the follow-up.
Kindly note that we attempted to reproduce this issue from our side using the same Firefox version on multiple devices, however, the file is always successfully downloaded.
Can you please confirm that this issue occurs with other large files as well?
Can you also let us know what exactly occurs when the download completes on the web app?
Looking forward to your reply.
Kind regards,
NAME
Customer Support
Proton Mail
5. (me)
Hi,
I took a screen recording of my 4 attempts to download the file. After making the recording, I tried the download again, while profiling the Proton Drive tab using the "debug" preset of the Firefox profiler, the profiler was ran from the start of the download, until the browser mistakenly reports it as "completed". Both the screen recording and profiler capture can be found in this shared folder.
The screen recording is made with on Linux with a clean Firefox profile, no settings were changed from their defaults. I can also reproduce the issue using a clean profile with the same version of Firefox on macOS.
In the screen recording, I have a resource monitor running beside the browser. Re watching it, I noticed that system memory consumption increases significantly during the attempts (from 4.5G to 26.8G at the end). That immediately caught my attention, because the full .iso file I was trying to download is 5.42G, and (26.8 - 4.5) / 5.42 = 4.11, almost exactly the number of my download attempts. Closing the Proton Drive tab doesn't free the 22.3G of memory, but closing Firefox does. That 22.3G of memory is being taken up by a Firefox Service Worker process. I've also replicated this memory issue on macOS.
Following this discovery, I went to Mozilla's bug tracker, searched for "service worker", sorted results by new, and found this issue.
This leads me to believe this is almost certainly a bug introduced in the Firefox 134 - 134.0.1 update. I have added a comment on the Bugzilla thread to let the developers know this issue might be breaking downloads from Proton Drive.
| Reporter | ||
Comment 6•1 year ago
|
||
I can confirm that 134.0.2 from https://ftp.mozilla.org/pub/firefox/releases/134.0.2/ is working again. Thank you!
Comment 7•1 year ago
|
||
Thank you for reporting back, and sorry for causing inconvenience!
Updated•1 year ago
|
Description
•