Closed Bug 1520992 Opened 7 years ago Closed 7 years ago

webRequest.onBeforeSendHeaders in blocking mode stops firefox PWA from loading target page on android

Categories

(Firefox for Android Graveyard :: General, defect)

Firefox 64
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1496684

People

(Reporter: mattleeper, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Steps to reproduce:

Perform following steps in Android FireFox 64.0.1.

  1. Install an browser extension that uses webRequest.onBeforeSendHeaders with blocking e.g.
    browser.webRequest.onBeforeSendHeaders.addListener(
    function(details)
    {
    details.requestHeaders.push({'name': 'MyHeaderName', 'value': 'myHeaderValue'});
    return {requestHeaders: details.requestHeaders};
    },
    {urls: ["<all_urls>"]},
    ['blocking','requestHeaders']);
  2. Add a Progressive Web App (PWA) to home page (Must be one that is intercepted by the url filters and extension manifest permissions).
  3. Close both PWA and firefox. *This bug does not occur if firefox is running in the background!
    4.Open PWA.
  4. Target page will not load.

I've confirmed this does not affect 63.0.2 and began with 64.0.1 and still affects 64.0.2. It only occurs when the 'blocking' parameter is used. And does not occur if firefox is running in the background.

Actual results:

PWA will open on a blank white screen and not progress further. e.g. will not display target page.

Expected results:

PWA will open, Header is added to request and PWA will load target page.

Summary: webRequest.onBeforeSendHeaders in blocking mode does not work in a PWA on android → webRequest.onBeforeSendHeaders in blocking mode stops firefox PWA from loading target page on android
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
  1. Add a Progressive Web App (PWA) to home page (Must be one that is intercepted by the url filters and extension manifest permissions).

Not sure what that is... What would be a PWA to add specifically in order to reproduce the issue?

A custom tab would work equally. If you've got a computer and ADB handy, you can launch one by running adb shell am start --esn android.support.customtabs.extra.SESSION -a android.intent.action.VIEW -d http://www.example.com.

Alternatively, someone else might know some good examples for apps that are using custom tabs.

Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.