Open Bug 1920427 Opened 9 months ago Updated 6 days ago

JavaScript Error: "TypeError: can't access property "gMultiProcessBrowser", chromeWin is null" {file: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs" line: 37}

Categories

(GeckoView :: General, defect)

All
Android
defect

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned, NeedInfo)

Details

I have seen this failure when investigating this reported test failure on Treeherder. Opening the corresponding Android log file shows:

09-22 23:53:01.893  4236  4251 E GeckoConsole: [JavaScript Error: "TypeError: can't access property "gMultiProcessBrowser", chromeWin is null" {file: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs" line: 37}]
09-22 23:53:01.893  4236  4251 E GeckoConsole: isBrowserPrivate@resource://gre/modules/PrivateBrowsingUtils.sys.mjs:37:9
09-22 23:53:01.893  4236  4251 E GeckoConsole: setTabActive@resource://gre/modules/GeckoViewWebExtension.sys.mjs:825:51
09-22 23:53:01.893  4236  4251 E GeckoConsole: onEvent@resource://gre/modules/GeckoViewTab.sys.mjs:215:34
09-22 23:53:01.893  4236  4251 E GeckoConsole: _dispatch@resource://gre/modules/GeckoViewModule.sys.mjs:152:21
09-22 23:53:01.893  4236  4251 E GeckoConsole: onEvent@resource://gre/modules/GeckoViewModule.sys.mjs:140:12
09-22 23:53:01.907  4271  4271 I ServiceChildProcess: Destroying GeckoServiceChildProcess

As it looks like the following line is accessed when the content browser is being destroyed:

const isPrivate = lazy.PrivateBrowsingUtils.isBrowserPrivate(browser);

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

For more information, please visit BugBot documentation.

Flags: needinfo?(bugzeeeeee)
Severity: -- → S4

As far as I understand, GeckoView doesn't have gBrowser constants. (The geckoview.js doesn't define them v. the browser.js that defines the constants for Desktop.) I usually have to add guards whenever I see them in toolkit code. Maybe PrivateBrowsingUtils.sys.mjs needs an Android logic gate?

Olivia, it might need some kind of tab browser class for GeckoView similar to gBrowser on desktop. In https://phabricator.services.mozilla.com/D249529 Makoto tried with our MobileTabBrowser class from Remote Protocol and it might work if we have such a class somewhere located in GeckoView instead of Remote Protocol.

You need to log in before you can comment on or make changes to this bug.