Chrome page action not enabled in incognito mode when downloaded from the Chrome Web Store

34 views
Skip to first unread message

Pep Condal

unread,
Aug 15, 2017, 12:27:23 PM8/15/17
to Chromium-discuss
Hi All,

I have a page action, enabled with declarativeContent.

The page action opens additional tabs during its execution using window.open(url). It waits for these additional tabs to complete loading, so the extension has also "tabs" permission.

When in incognito mode, as to avoid that window.open() opens the tab in normal mode not having access to the incognito mode cookies, I have added the "incognito": "split" key to the manifest.

The page action extension works well when run locally, that is, when I reach a page that matches declarativeContent in incognito mode, the page action icon is enabled and I can click it.

However, if I publish to the Chrome Web Store and install it from Web Store, when I reach a page that matches declarativeContent in incognito mode that page action icon is disabled and I cannot click it.

This behavior seems to the caused by the presence in the manifest of the "key" key added by the Web Store publishing process.

Is is that bug in Chrome or am I missing anything?

The behavior is the same for Chromium (latest build): It seems that if the manifest contains both a "key" key and a "incognito": "split" key, then declarativeContent is ignored when in incognito mode.

Regards,
Pep.

PhistucK

unread,
Aug 15, 2017, 12:36:33 PM8/15/17
to pco...@gmail.com, Chromium-discuss
Note - stackoverflow.com is more suited for extensions related questions. Alternatively, you can use the more specific chromium-extensions.

Did you tick the "Allow in incognito" checkbox?


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Pep Condal

unread,
Aug 15, 2017, 12:41:12 PM8/15/17
to PhistucK, Chromium-discuss
Yes, "Allow in incognito" is ticked.  Is seems that when an extension works with incognito split mode then it needs to add the declarativeContent rules twice, once for the non-incognito context and once for the incognito context.

I still have not figured out how to populate with rules both contexts in the chrome.runtime.OnInstall event, but thank you for the pointers for help.
Reply all
Reply to author
Forward
0 new messages