New issue
Advanced search Search tips

Issue 825507 link

Starred by 5 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 377978



Sign in to add a comment

declarativeContent.RequestContentScript not working in incognito mode (split)

Reported by ivanri...@yahoo.com.ar, Mar 24 2018

Issue description

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

Steps to reproduce the problem:
1. Allow the extension in incognito mode
2. Open a new incognito window
3. Press the extension action button
4. The HTML body on test.com should be replaced to 'WORKED!'

What is the expected behavior?
Rule defined with `chrome.declarativeContent.onPageChanged` works only in normal mode, but it should work too on Incognito mode.

What went wrong?
The `chrome.declarativeContent` API is not working in Incognito mode.

I tried the solution posted at https://stackoverflow.com/a/25537746 for `chrome.runtime.onInstalled` but it does not work either. At least for `chrome.declarativeContent.onPageChanged` and a rule with `PageStateMatcher` and `RequestContentScript`.

Tested on Chrome 65 and 49.

I don't know if this is a bug on Chromium or if using `PageStateMatcher`/`RequestContentScript` is blocked in Incognito mode for some reason.

Note: This issue differs from https://bugs.chromium.org/p/chromium/issues/detail?id=408326

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 65.0.3325.181  Channel: stable
OS Version: 10.0
Flash Version:
 
manifest.json
329 bytes View Download
background.js
1.1 KB View Download
script.js
102 bytes View Download

Comment 1 by rob@robwu.nl, Mar 24 2018

Blocking: 377978
Components: Platform>Extensions>API
Labels: OS-Chrome OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Summary: declarativeContent.RequestContentScript not working in incognito mode (split) (was: declarativeContent not working in incognito mode (split))
declarativeContent is working. You can test that by replacing "browser_action" with "page_action" in manifest.json, and appending "new chrome.declarativeContent.ShowPageAction() to the actions array in background.js
(and optionally, replace "chrome.browserAction" with "chrome.pageAction" in background.js)
Then you will see that the icon is enabled if you navigate to the test page.

So apparently declarativeContent.ShowPageAction is broken.

Comment 2 by rob@robwu.nl, Mar 24 2018

> So apparently declarativeContent.ShowPageAction is broken.

That should have been "declarativeContent.RequestContentScript is broken in split incognito mode".
Rob, thanks for narrow it down!

Looking at your issue https://bugs.chromium.org/p/chromium/issues/detail?id=708115 (which I faced too) posted almost a year ago it seems I will have to think for a work-around in incognito mode :)
Cc: rhalavati@chromium.org

Sign in to add a comment