Closed Bug 1587960 Opened 5 years ago Closed 5 years ago

Simple listener webRequest.onBeforeRequest xmlhttprequest with filterResponseData results in page load failure

Categories

(WebExtensions :: Request Handling, defect, P1)

71 Branch
defect

Tracking

(firefox-esr60 unaffected, firefox-esr68 unaffected, firefox67 unaffected, firefox68 unaffected, firefox69 unaffected, firefox70 unaffected, firefox71 disabled, firefox72 verified)

VERIFIED FIXED
mozilla72
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- unaffected
firefox71 --- disabled
firefox72 --- verified

People

(Reporter: particlecore, Assigned: perry)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached file test.zip

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

Steps to reproduce:

Simple xmlhttprequest webRequestBlocking listener that does nothing but decode and encode the stream.

See attached extension example for testing.

Install it on Nightly (current version I tested on was 2019-10-10 also on the previous one 2019-10-09)
Open any YouTube video, for example: https://www.youtube.com/watch?v=YzbARjL1o-s
Select another video on the right side in order to navigate the page or simply click to go to the homepage
The top of the website shows a progress bar conveying the loading state for the navigation that was initiated

This is a Single Page Application style loading, it loads the next page via a JSON file and updates the DOM when it finishes receiving it.

Actual results:

The progress bar never reaches the end and the page never finishes loading. The next video might play, but that's the only thing that happens.

This problem was not happening until 3 days ago. I thought this was a problem with my code, but just removing the "filterResponseData" alone from the background script makes the page work normally again.

It was working perfectly fine before and modifications were being applied with success.

It feels like the website no longer receives the intercepted request after it is modified.

Expected results:

The page should finish loading, normal behavior should not be affected since there is nothing being modified on the request, the only thing being done is attaching a filterResponseData to the requestId.

Component: Untriaged → Request Handling
Product: Firefox → WebExtensions
Version: 71 Branch → Firefox 71

Hello,

I have managed to reproduce the issue on the latest Nightly (71.0a1/20191015213743) under Windows 10 Pro 64-bit and MacOS Catalina 10.15, with additional test on the latest Beta (70.0/20191014163058) and Release (69.0.3/20191009172106), where the issue does not occur.

With the extension loaded in the browser, the page fails to completely load, the progress bar not reaching the end. Removing the filterResponseData from the background script causes the page to function normally.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

Jim, could you prioritize this bug wrt to our 71 release? I'd like to know if this is something we should track for a potential uplift in beta. Thanks.

Flags: needinfo?(jmathies)

This is a regression on the current nightly, if we can get the regression window, it might be something solvable prior merging to beta.

I've verified that flipping the pref dom.serviceWorkers.parent_intercept and restarting fixes/causes the problem.

Flags: needinfo?(jmathies) → needinfo?(perry)
Priority: -- → P1
Has Regression Range: --- → yes
Has STR: --- → yes
Version: Firefox 71 → 71 Branch

Whatever fix was implemented for this bug royally messed up the API, I have users suddenly not able to load the page at all after they've updated Firefox to 72.0a1 (2019-10-23)

The webpage is now showing just a Content Encoding Error everywhere:

https://github.com/ParticleCore/Iridium/issues/788

(In reply to particlecore from comment #7)

Whatever fix was implemented for this bug

No patch is on this bug, if there were a fix it would be posted and the bug closed.

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

(In reply to particlecore from comment #7)

Whatever fix was implemented for this bug

No patch is on this bug, if there were a fix it would be posted and the bug closed.

My apologies, I thought the last update meant it was already.

In that case I will open a new bug report for this problem.

Assignee: nobody → perry
Flags: needinfo?(perry)

Hello Shane,
Could 1590898 be added as a blocker for this ticket as testing any potential fix for this would be more efficient after any work related to filterResponseData is done?

Flags: needinfo?(mixedpuppy)

That has the same reporter with almost an identical test. It would be easy to confirm (see comment 6) if it's the same issue, in which case I think it should be dup'd to this bug rather than blocking.

Flags: needinfo?(mixedpuppy)

1590898 is not related.

dom.serviceWorkers.parent_intercept is false on beta/release, marking as Disabled for 71.

This is needed when to pass the right data to nested nsIStreamListeners.

Attachment #9107049 - Attachment description: Bug 1587960 - Propagate StreamFilterParent::OnStopRequest's nsIRequest to EmitStopRequest r=asuth → Bug 1587960 - Replace StreamListenerParent's channel on internal redirects r=asuth
Status: NEW → ASSIGNED
Pushed by pjiang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8df9e44645e4
Replace StreamListenerParent's channel on internal redirects r=asuth,mattwoodrow,kmag
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

Verified fixed on Windows PRO 10 64-bit and on macOS Catalina 10.15 with FF Nightly 72.0a1 (20191111215252).
Tested with youtube / dailymotion pages and videos to verify that they load successfully when picking the next video.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: