Closed Bug 1707469 Opened 4 years ago Closed 3 years ago

downloads.download failing with CRASH error code for specific URLs

Categories

(WebExtensions :: General, defect)

Firefox 88
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1710251

People

(Reporter: mark, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

911 bytes, application/x-zip-compressed
Details
Attached file test-issue.zip

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.

Summary: downloads.download failing for specific URL → downloads.download failing with CRASH error code for specific URLs

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.

Component: Untriaged → Downloads Panel

This looks to be similar to Bug 1707457

See Also: → 1707457
See Also: 1707457

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

Component: Downloads Panel → General
Product: Firefox → WebExtensions
Severity: -- → S2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1600326
Has Regression Range: --- → yes

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...)

Is this still an S2?

Flags: needinfo?(mixedpuppy)

removing severity to push it into our triage

Severity: S2 → --
Flags: needinfo?(mixedpuppy)

Rob, do you maybe have an idea what we should do here?

Flags: needinfo?(rob)

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.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(rob)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: