Closed Bug 1649463 Opened 4 years ago Closed 4 years ago

With browser.privatebrowsing.autostart set to true, browser.downloads.download results in `CRASH` status when trying to download a blob URI

Categories

(WebExtensions :: Request Handling, defect)

79 Branch
defect

Tracking

(firefox-esr68 unaffected, firefox-esr78 unaffected, firefox77 unaffected, firefox78 unaffected, firefox79 fixed, firefox80 fixed)

RESOLVED FIXED
mozilla80
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox77 --- unaffected
firefox78 --- unaffected
firefox79 --- fixed
firefox80 --- fixed

People

(Reporter: gildas.lormeau, Assigned: robwu)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached file addon.zip

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Steps to reproduce:

Use Firefox 79 Nightly to reproduce this issue.

1 - Create a new profile in Firefox in about:profile
2 - Click on "Launch profile in new browser"
3 - In the opened window, go to about:config and set browser.privatebrowsing.autostart to true
4 - Close the window
5 - Open again the browser by clicking on "Launch profile in new browser"
6 - Unzip the attached file somewhere on your disk, it contains the code of an extension which reproduces the issue
7 - Install the extension manually via about:debugging#/runtime/this-firefox
8 - Go to about:addons, select the extension (named "Demo") and enable "Run in Private Windows"

The code of the extension creates a file named "hello.txt" and try to download it by calling browser.downloads.download. The content of the file is created when the code is run and a blob URI is used to download the file.

Actual results:

A download is interrupted. A "CRASH" error is displayed in the console of the background page of the extension.

Expected results:

A file named "hello.txt" should have been downloaded. Note that this is a regression, this extension works as expected in Firefox 77.

This bug impacts the extension "SingleFile". Here is the corresponding issue in the tracker of SingleFile: https://github.com/gildas-lormeau/SingleFile/issues/435.

Product: Firefox → WebExtensions

Marco, This is probably the same as bug 1633191, but has an STR.

Flags: needinfo?(mak)
See Also: → 1633191

Hi,

Thank you for taking the time to submit this bug report. After testing on Windows 10 x64 bit and MacOS 10.14 with Firefox Nightly 80.0a1 (20200705214003), Beta 79.0b4 (20200703150958), Release 78.0.1 (20200630195452) and Release 77 (20200528194502), I was able to reproduce the issue on the tested Beta and Nightly versions.

As an added note, in the Release versions although the bug was not reproduced, the browser window was not showing any information that the "hello.text" file was downloaded. The browser's downloads location window was needed to be opened in order to make sure that the file was indeed downloaded, or not.

A regression range was found on the issue, narrowing it down to https://bugzilla.mozilla.org/show_bug.cgi?id=1579911 (2020-07-06T17:15:36.502000: DEBUG : Found commit message: Bug 1579911 - Allow extensions to observe and modify requests created by downloads.download extension API. r=robwu,mak), with this differential revision: https://phabricator.services.mozilla.com/D66732.

Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=7b022a19b8d9f7bd809a9ba9df0fb6bc3fa09a85&tochange=02deda62a783db6a440a4870ddc2dc8e7e2a01c5

Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Ever confirmed: true
Component: Untriaged → Request Handling
Flags: needinfo?(rob)
Regressed by: 1579911

(In reply to Shane Caraveo (:mixedpuppy) from comment #1)

Marco, This is probably the same as bug 1633191, but has an STR.

I'll have a look in case they are related, but considering the reg-range it may just be the same sympthoms

Shane, could you assign a priority and severity to this one?

Flags: needinfo?(mixedpuppy)

We triage bugs every Thursday, so we will get to it eventually.

There is a needinfo on me, to investigate it (so we can make a more informed decision during bug triage).

Flags: needinfo?(mixedpuppy)
Summary: With browser.privatebrowsing.autostart set to true, browser.downloads.download crashes when trying to download a blob URI → With browser.privatebrowsing.autostart set to true, browser.downloads.download results in `CRASH` status when trying to download a blob URI

Fx79 RC week is next week, so it's unlikely we'll ship a fix for this in time unless an extremely low-risk fix appears soon.

I got a fix.

Assignee: nobody → rob
Status: NEW → ASSIGNED
Flags: needinfo?(rob)
Flags: needinfo?(mak)
See Also: → 1653636
See Also: → 1653681
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/128ad3cbfcf2
Support blob: in downloads.download in perma-private browsing mode r=zombie
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80

Comment on attachment 9164404 [details]
Bug 1649463 - Support blob: in downloads.download in perma-private browsing mode

Beta/Release Uplift Approval Request

  • User impact if declined: Extensions cannot create a download with extension-defined data when perma-private browsing mode is enabled.
    This is a regression in 79 (beta).
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch partially reverts the patch in Firefox 79, to restore the behavior from Firefox 78 and earlier.
    The resulting behavior is expected, well-understood and covered by unit tests.
  • String changes made/needed:
Attachment #9164404 - Flags: approval-mozilla-beta?

Comment on attachment 9164404 [details]
Bug 1649463 - Support blob: in downloads.download in perma-private browsing mode

Fixes a new regression in Fx79 and includes a new test. Approved for 79.0rc1. Thanks for the quick fix here.

Attachment #9164404 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: