Closed Bug 1503881 Opened 6 years ago Closed 5 years ago

JavaScript error: resource:///modules/aboutpages/AboutPrivateBrowsingHandler.jsm, line 26: TypeError: this.pageListener is undefined; can't access its "removeMessageListener" property

Categories

(Firefox :: Private Browsing, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1469774
Tracking Status
firefox65 --- affected

People

(Reporter: whimboo, Unassigned)

Details

During startup of Firefox in headless mode the following Javascript error is seen by some people using geckodriver and Marionette to automate tests:

> JavaScript error: resource:///modules/aboutpages/AboutPrivateBrowsingHandler.jsm, line 26: TypeError: this.pageListener is undefined; can't access its "removeMessageListener" prope
rty

>   uninit() {
>     for (let topic of this._topics) {
>       this.pageListener.removeMessageListener(topic);
>     }
>     this.pageListener.destroy();
>   },

As it looks like `uninit()` is called before `init()` was able to set `this.pageListener`.
That sounds likely. We probably need to check if pageListener is present and/or have an "initialized" variable here.
By any chance could this cause a problem with `sessionstore-windows-restored` not to be fired?
That sounds unlikely to me, but sessionstore-windows-restored not being fired could be an indicator why init() isn't being run (unless it's simply a weird race condition).
Ah, I see. That could indeed be a problem then if the dependency is the other way around. See bug 1382162 for the missing observer notification problem.
I think this is a dupe of bug 1469774
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.