downloads.download failing with CRASH error code for specific URLs
Categories
(WebExtensions :: General, defect)
Tracking
(Not tracked)
People
(Reporter: mark, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
911 bytes,
application/x-zip-compressed
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Steps to reproduce:
A user of Foxy Gestures has logged an issue about an Instagram URL that fails to download through the WE downloads.download API. He says the issue affects all Instagram URLs.
A sample URL is provided in this GitHub issue. https://github.com/marklieberman/foxygestures/issues/351 (Beware, the sample URL is an image of a woman in a very low cut top.)
I also attached a trivial WE that adds a context menu item called "Test Download" that calls browser.downloads.download() with the URL and console logs the downloads.onChanged event.
The same URL can be saved using built-in Save Image As... content menu item as well as wget and curl without issue.
Actual results:
The item is added to the downloads list, but immediately fails. A request appears in the Browser Console, but the transferred bytes is 0B.
The download state updated with an error and the error code is "CRASH".
Expected results:
The item should be downloaded successfully.
Comment 1•4 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 revert this change in case you think the bot is wrong.
Comment 4•4 years ago
|
||
The "CRASH" name is a bit unexpected here, it should probably be something like UNEXPECTED_FAIILURE or UNKNOWN_FAILURE:
https://searchfox.org/mozilla-central/rev/1ed1bb14eed9b3f27a94513387608436ea74c247/toolkit/components/extensions/parent/ext-downloads.js#246-253
I'm checking if there's a reg-range
Comment 5•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 6•4 years ago
•
|
||
Looks like the server sends:
cross-origin-resource-policy: same-origin
headers for the image, so I suspect this is an issue with the principal used for the download request from the webextension API.
(So to be clear, ideally the download should work, but even if/when that is fixed, the error reporting on the download towards the webextension could be improved, perhaps...)
Updated•4 years ago
|
Comment 8•3 years ago
|
||
removing severity to push it into our triage
Comment 9•3 years ago
|
||
Rob, do you maybe have an idea what we should do here?
Comment 10•3 years ago
|
||
Hmm. Looks like a needinfo from me for me fell through the cracks. I am aware of this bug and even sketched a solution at bug 1710251.
Description
•