A mismatch occurs between Retry button and canResume property.
Categories
(WebExtensions :: General, defect, P5)
Tracking
(firefox136 verified)
| Tracking | Status | |
|---|---|---|
| firefox136 | --- | verified |
People
(Reporter: topblade71, Assigned: kernp25)
References
Details
(Keywords: dev-doc-complete)
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36
Steps to reproduce:
I tried to resume the failed download through the API.
I used "browser.downloads.search" and "browser.downloads.resume".
Actual results:
canResume property appears false, even though I can resume the download with the retry button for downloads that currently fail with “NETWORK_FAILED”.
This makes it impossible to resume downloading again through the API.
Expected results:
I think this is a parity bug because Chrome supports it.
In Chrome, canResume is true, so it is possible to resume a failed download with downloads.resume
The ability to resume failed downloads through the API would be useful to Firefox.
I hope canResume appears true for the failed download.
Hi,
unfortunately I don't have the technical knowledge to test this on my end, but as a starting point I'll add this ticket to the Core-Networking component.
Thanks.
Comment 2•4 years ago
|
||
This seems to be an issue with the webextensions API.
Comment 3•4 years ago
|
||
Hello,
I’m from QA and I’m attempting to reproduce and confirm the issue you are encountering, but have somewhat limited knowledge of add-on building. Could you by any chance attach the extension you used when you encountered the issue (assuming you called "browser.downloads.search" and "browser.downloads.resume" through an add-on) ?
Thank you !
(In reply to Alex Cornestean from comment #3)
Hello,
I’m from QA and I’m attempting to reproduce and confirm the issue you are encountering, but have somewhat limited knowledge of add-on building. Could you by any chance attach the extension you used when you encountered the issue (assuming you called "browser.downloads.search" and "browser.downloads.resume" through an add-on) ?
Thank you !
Hello,
I've attached an add-on that I used for testing. (FRX_TEST.zip)
I am using "browser.downloads.search" and "browser.downloads.resume" in resumeDownload of background.js.
Resumption can be controlled through a switch in popup.html.
Thanks.
Comment 6•4 years ago
|
||
canResume's implementation matches the documentation:
A boolean indicating whether a currently-interrupted (e.g. paused) download can be resumed from the point where it was interrupted (true), or not (false).
In Chrome, the documentation is https://developer.chrome.com/docs/extensions/reference/downloads/#type-DownloadItem
True if the download is in progress and paused, or else if it is interrupted and can be resumed starting from where it was interrupted.
In Firefox, the resume() method can actually be called as long as the download hasn't succeeded yet and isn't in progress: https://searchfox.org/mozilla-central/rev/644e42ded761d4f3ce108fa776197730a9a2c535/toolkit/components/downloads/DownloadCore.jsm#335-364
So I suppose that we can change canResume to more closely match the implementation, or at least for network failures.
Comment 7•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Downloads Panel' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•3 years ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 10•1 year ago
|
||
The severity field for this bug is set to S4. However, the following bug duplicate has higher severity:
- Bug 1467059: S3
:kernp25, could you consider increasing the severity of this bug to S3?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
| Assignee | ||
Comment 11•1 year ago
|
||
Should the test only make sure that canResume will be true for failed downloads (e.g. NETWORK_FAILED)?
Would this be enough? So people can use browser.downloads.resume for failed downloads.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 12•1 year ago
|
||
Comment 13•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Comment 14•1 year ago
|
||
Should the changes_for_add-on_developers section also have some notes about it?
Comment 15•1 year ago
|
||
Verified as Fixed. Tested on the latest Nightly (136.0a1/20250116214017) and Beta (135.0b5/20250115091607) for comparison, on Windows 10 x64 and Ubuntu 24.04 LTS.
The canResume property is set to true when a download fails with NETWORK_FAILED on the latest Nightly, confirming the fix. See attached screenshot for more details.
Comment 16•1 year ago
|
||
Comment 17•10 months ago
|
||
Release note added in # Bug-1694049 canResume is now true after NETWORK_FAILED error #38837
Updated•10 months ago
|
Description
•