Closed
Bug 1369750
Opened 8 years ago
Closed 8 years ago
Intermittent browser/base/content/test/general/browser_aboutHome.js | A promise chain failed to handle a rejection: this._window.document.body is null
Categories
(Firefox :: New Tab Page, defect, P1)
Firefox
New Tab Page
Tracking
()
VERIFIED
FIXED
Firefox 55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: intermittent-bug-filer, Assigned: Fischer)
References
Details
(Keywords: intermittent-failure, Whiteboard: [photon-onboarding])
Attachments
(1 file)
Comment 1•8 years ago
|
||
The timing of when this started makes me very suspicious of bug 1369296.
Blocks: 1369296
Flags: needinfo?(gasolin)
| Comment hidden (Intermittent Failures Robot) |
Comment 4•8 years ago
|
||
In https://queue.taskcluster.net/v1/task/Z4o-sxA0Sk-4cmB2H0K4Iw/runs/0/artifacts/public/logs/live_backing.log I found
09:21:57 INFO - GECKO(3112) | JavaScript error: resource://onboarding/onboarding.js, line 32: TypeError: this._window.document.body is null
It means occasionally the `document` or `document.body` in contentWindow object is not available.
I can add some dom exist check before calling `new Onboarding(content);` to detour the Intermittent, but it does not find the root cause.
```
if (!content.document || !content.document.body) {
return;
}
```
http://searchfox.org/mozilla-central/source/browser/extensions/onboarding/content/onboarding.js#105
Dave, do you know why it happens when we access content after got the `load` event?
Flags: needinfo?(gasolin) → needinfo?(dtownsend)
| Assignee | ||
Comment 5•8 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #4)
> In
> https://queue.taskcluster.net/v1/task/Z4o-sxA0Sk-4cmB2H0K4Iw/runs/0/
> artifacts/public/logs/live_backing.log I found
>
> 09:21:57 INFO - GECKO(3112) | JavaScript error:
> resource://onboarding/onboarding.js, line 32: TypeError:
> this._window.document.body is null
>
> It means occasionally the `document` or `document.body` in contentWindow
> object is not available.
>
>
> I can add some dom exist check before calling `new Onboarding(content);` to
> detour the Intermittent, but it does not find the root cause.
>
>
> ```
> if (!content.document || !content.document.body) {
> return;
> }
> ```
>
> http://searchfox.org/mozilla-central/source/browser/extensions/onboarding/
> content/onboarding.js#105
>
> Dave, do you know why it happens when we access content after got the `load`
> event?
Maybe we can use the passed-in event object instead, such as,
```
addEventListener("load", function(evt) {
content.console.log("evt.target =", evt.target); // This is the document
let window = evt.target.defaultView;
// Load onboarding module only when we enable it.
if ((window.location.href == ABOUT_NEWTAB_URL ||
window.location.href == ABOUT_HOME_URL) &&
Services.prefs.getBoolPref("browser.onboarding.enabled", false)) {
window.requestIdleCallback(() => {
new Onboarding(window);
});
}
}, true);
```
| Assignee | ||
Comment 6•8 years ago
|
||
(In reply to Fischer [:Fischer] from comment #5)
> (In reply to Fred Lin [:gasolin] from comment #4)
> > In
> > https://queue.taskcluster.net/v1/task/Z4o-sxA0Sk-4cmB2H0K4Iw/runs/0/
> > artifacts/public/logs/live_backing.log I found
> >
> > 09:21:57 INFO - GECKO(3112) | JavaScript error:
> > resource://onboarding/onboarding.js, line 32: TypeError:
> > this._window.document.body is null
> >
> > It means occasionally the `document` or `document.body` in contentWindow
> > object is not available.
> >
> >
> > I can add some dom exist check before calling `new Onboarding(content);` to
> > detour the Intermittent, but it does not find the root cause.
> >
> >
> > ```
> > if (!content.document || !content.document.body) {
> > return;
> > }
> > ```
> >
> > http://searchfox.org/mozilla-central/source/browser/extensions/onboarding/
> > content/onboarding.js#105
> >
> > Dave, do you know why it happens when we access content after got the `load`
> > event?
> Maybe we can use the passed-in event object instead, such as,
>
> ```
> addEventListener("load", function(evt) {
> content.console.log("evt.target =", evt.target); // This is the document
> let window = evt.target.defaultView;
> // Load onboarding module only when we enable it.
> if ((window.location.href == ABOUT_NEWTAB_URL ||
> window.location.href == ABOUT_HOME_URL) &&
> Services.prefs.getBoolPref("browser.onboarding.enabled", false)) {
>
> window.requestIdleCallback(() => {
> new Onboarding(window);
> });
> }
> }, true);
> ```
Running a try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=417950e70c9954378c855287a8a0aead5f23fdf4
| Assignee | ||
Comment 7•8 years ago
|
||
(In reply to Fischer [:Fischer] from comment #6)
> (In reply to Fischer [:Fischer] from comment #5)
> > Maybe we can use the passed-in event object instead, such as,
> >
> > ```
> > addEventListener("load", function(evt) {
> > content.console.log("evt.target =", evt.target); // This is the document
> > let window = evt.target.defaultView;
> > // Load onboarding module only when we enable it.
> > if ((window.location.href == ABOUT_NEWTAB_URL ||
> > window.location.href == ABOUT_HOME_URL) &&
> > Services.prefs.getBoolPref("browser.onboarding.enabled", false)) {
> >
> > window.requestIdleCallback(() => {
> > new Onboarding(window);
> > });
> > }
> > }, true);
> > ```
> Running a try:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=417950e70c9954378c855287a8a0aead5f23fdf4
Stop the previous one(because of some redundant and error-making test logs) and push another TRY: https://treeherder.mozilla.org/#/jobs?repo=try&revision=929e0351ad11cee5e720ac7236fb055aac593bad
| Assignee | ||
Updated•8 years ago
|
Whiteboard: [photon-onboarding]
Updated•8 years ago
|
Assignee: nobody → fliu
Status: NEW → ASSIGNED
Flags: qe-verify+
Priority: -- → P1
QA Contact: jwilliams
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•8 years ago
|
Attachment #8874398 -
Flags: review?(dtownsend)
| Assignee | ||
Comment 9•8 years ago
|
||
Hi Mossop,
This patch uses window from event.target.defaultView inside load event to make sure getting the right target window.
TRY is here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=929e0351ad11cee5e720ac7236fb055aac593bad.
Comment 10•8 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #4)
> In
> https://queue.taskcluster.net/v1/task/Z4o-sxA0Sk-4cmB2H0K4Iw/runs/0/
> artifacts/public/logs/live_backing.log I found
>
> 09:21:57 INFO - GECKO(3112) | JavaScript error:
> resource://onboarding/onboarding.js, line 32: TypeError:
> this._window.document.body is null
>
> It means occasionally the `document` or `document.body` in contentWindow
> object is not available.
>
>
> I can add some dom exist check before calling `new Onboarding(content);` to
> detour the Intermittent, but it does not find the root cause.
>
>
> ```
> if (!content.document || !content.document.body) {
> return;
> }
> ```
>
> http://searchfox.org/mozilla-central/source/browser/extensions/onboarding/
> content/onboarding.js#105
>
> Dave, do you know why it happens when we access content after got the `load`
> event?
We might be getting load events for images and other resources inside the new tab page meaning the DOM might not be complete at that point. What we should do is verify that the load event is coming from the content window.
Flags: needinfo?(dtownsend)
Comment 11•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8874398 [details]
Bug 1369750 - Get window from event.target.defaultView inside load event to make
https://reviewboard.mozilla.org/r/145772/#review149776
I think what we should be doing here is testing that evt.target == content.document. This verifies that the load event is coming from the document for the top-level window.
Attachment #8874398 -
Flags: review?(dtownsend) → review-
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 13•8 years ago
|
||
(In reply to Fischer [:Fischer] from comment #12)
> Comment on attachment 8874398 [details]
> Bug 1369750 - Get window from event.target.defaultView inside load event to
> make
>
> Review request updated; see interdiff:
> https://reviewboard.mozilla.org/r/145772/diff/1-2/
Hi Mossop,
Thanks for explanation to see the updated patch.
Comment 14•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8874398 [details]
Bug 1369750 - Get window from event.target.defaultView inside load event to make
https://reviewboard.mozilla.org/r/145772/#review150272
Looks good, thanks for the change.
Attachment #8874398 -
Flags: review?(dtownsend) → review+
| Assignee | ||
Comment 15•8 years ago
|
||
TRY: https://treeherder.mozilla.org/#/jobs?repo=try&revision=eacb37a4fe0b9db3127b9e3b734f661cfc206afd
Keywords: checkin-needed
Comment 16•8 years ago
|
||
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/57187d8e1433
Get window from event.target.defaultView inside load event to make r=mossop
Keywords: checkin-needed
| Assignee | ||
Comment 18•8 years ago
|
||
(In reply to Fischer [:Fischer] from comment #17)
> Hi Philor
(Sorry for the accidentally hitting the enter key)
Is this bug ready to land into the mc? thanks
Comment 19•8 years ago
|
||
After 21 hours without being backed out? I'd certainly think so, yes, but that's not how getting to m-c works. It isn't a matter of "my push is fine," but instead a matter of "a sheriff manages to arrange his workday correctly, and a push exists somewhere above my push which has gotten PGO builds and all tests run on it and which doesn't have any bustage landed below it which wasn't also backed out below it, so that that push and everything which landed before it can be merged."
If instead you mean "why didn't Wes merge anything from autoland to mozilla-central during his workday today?" then I don't know, or if you mean "why did Ryan choose to merge mozilla-inbound to mozilla-central well after his workday even though merging isn't his job, but chose not to merge autoland to mozilla-central?" then I also don't know that.
Flags: needinfo?(philringnalda)
Comment 20•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Comment 21•8 years ago
|
||
Is there any verification needed from QA on this? If so, what exactly am I looking for when testing this fix? Thanks
Flags: needinfo?(fliu)
| Assignee | ||
Comment 22•8 years ago
|
||
(In reply to Justin [:JW_SoftvisionQA] from comment #21)
> Is there any verification needed from QA on this? If so, what exactly am I
> looking for when testing this fix? Thanks
During testing, please open the browser toolbox and the developer debugger and check out the console to see if some error about "onboarding". Thank you.
Flags: needinfo?(fliu)
Comment 23•8 years ago
|
||
I have verified that no errors about onboarding is shown in the browser toolbox or the developer debugger.
Status: RESOLVED → VERIFIED
| Comment hidden (Intermittent Failures Robot) |
You need to log in
before you can comment on or make changes to this bug.
Description
•