Open Bug 1748526 Opened 2 years ago Updated 1 year ago

BrowserAction popup always opens as non-private tab on Fenix

Categories

(GeckoView :: Extensions, defect, P3)

Tracking

(firefox-esr91 unaffected, firefox95 wontfix, firefox96 wontfix, firefox97 fix-optional)

Tracking Status
firefox-esr91 --- unaffected
firefox95 --- wontfix
firefox96 --- wontfix
firefox97 --- fix-optional

People

(Reporter: robwu, Unassigned)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [geckoview:2023?][addons-jira])

I discovered that extension action popups on Android are always opened in private browsing mode.

STR:

  1. Enable remote debugging for Fenix, and connect Fenix to Firefox on desktop (remote debugging).
  2. Install uBlock Origin on Android and grant it access to private browsing mode.
  3. Open a website in a private browsing tab.
  4. Click on the uBlock Origin icon, so that Fenix opens the browser_action popup panel.
  5. Go to the debugger on desktop, inspect the extension's background page and run:
    chrome.extension.getViews()

Expected:

  • Step 5 should yield an empty array.

Actual:

  • Step 5 yields an array containing the popup-fenix.html page, which implies that the background page and the popup panel share the same (non-private) browsing mode.

This bug used to exist on Fennec, but was fixed in bug 1493426. The unit test (test_popup_incognito) was removed in https://hg.mozilla.org/mozilla-central/rev/64fde5f3d49f and the regression was re-introduced in bug 1530402.

Set release status flags based on info from the regressing bug 1530402

(In reply to Rob Wu [:robwu] from comment #0)

This bug used to exist on Fennec, but was fixed in bug 1493426. The unit test (test_popup_incognito) was removed in https://hg.mozilla.org/mozilla-central/rev/64fde5f3d49f and the regression was re-introduced in bug 1530402.

🤦‍♂️

Can we please double-check those other removed tests for any other areas of missed coverage we should be re-adding?

(In reply to Ryan VanderMeulen [:RyanVM] from comment #2)

Can we please double-check those other removed tests for any other areas of missed coverage we should be re-adding?

I've done so, and filed bug 1749506.
I filed and fixed bug 1625593 before, which was even more significant than these two bugs.

The severity field is not set for this bug.
:mixedpuppy, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mixedpuppy)
Has Regression Range: --- → yes

GeckoView should open the popup with the right origin attributes (privateBrowsingId=1).

I don't see anything that accounts for the private browsing state of the current tab: https://searchfox.org/mozilla-central/rev/a2c26b9b49a521f4be39559ca1ca9c345a237c70/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtensionController.java#1242-1261

Component: Android → Extensions
Flags: needinfo?(mixedpuppy)
Product: WebExtensions → GeckoView
Severity: -- → S3
Priority: -- → P2
Whiteboard: [geckoview:m99?]
Whiteboard: [geckoview:m99?]

still relevant

Priority: P2 → P3
Whiteboard: [geckoview:2023?]
Whiteboard: [geckoview:2023?] → [geckoview:2023?][addons-jira]
You need to log in before you can comment on or make changes to this bug.