TypeError: header is null | contentSearchUI.js

RESOLVED FIXED in Firefox 57

Status

()

Firefox
Activity Streams: Newtab
RESOLVED FIXED
3 months ago
3 months ago

People

(Reporter: tcampbell, Assigned: k88hudson)

Tracking

(Blocks: 1 bug)

unspecified
Firefox 57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

3 months ago
In Nightly 20170913220121, I get TypeErrors when opening debug console on New Tab page.

STR:
  - Remove search from new tab page
  - Reload / Open a new new tab page
  - Open debug console

Expected:
  - Clean console

Actual:
  - TypeError: header is null | contentSearchUI.js:611:5 (_updateDefaultEngineHeader)

Comment 1

3 months ago
I can't seem to reproduce. I can set a breakpoint for when the search box is shown, but it never calls into contentSearchUI for me when I remove the search box.

If you turn on "Persist Logs", what do you see when reloading the page when you have search off? Should be one of

jar:file:…activity-stream@mozilla.org.xpi!/chrome/content/data/content/activity-stream-prerendered.html
jar:file:…activity-stream@mozilla.org.xpi!/chrome/content/data/content/activity-stream.html
(Reporter)

Comment 2

3 months ago
I see: activity-stream@mozilla.org.xpi!/chrome/content/data/content/activity-stream-prerendered.html

My new tab page has everything disabled. I'm on Win10 64-bit FF. This only started after last nightly update within 24hr.

Comment 3

3 months ago
Ah, did you disable things through the in-content preferences? It should have toggled browser.newtabpage.activity-stream.prerender to false automatically, but maybe something is broken.
(Reporter)

Comment 4

3 months ago
Correct. I'm using in-content prefs to toggle. It happens on Linux as well for me. If I add search, the error goes away, if I remove it comes back.

The browser.newtabpage.activity-stream.prerender is false in about:config and still uses prerended page.

Updated

3 months ago
Flags: needinfo?(khudson)
(Assignee)

Comment 5

3 months ago
Ah, looks like the prerender pref isn't getting properly read at initialization in aboutNewTabService
Flags: needinfo?(khudson)
Comment hidden (mozreview-request)
(Assignee)

Updated

3 months ago
Attachment #8908632 - Flags: review?(edilee)

Comment 7

3 months ago
mozreview-review
Comment on attachment 8908632 [details]
Bug 1399696 - aboutNewTabService should initialize with the correct _activityStreamPrerender value

https://reviewboard.mozilla.org/r/180300/#review185458

Maybe just initialize in the constructor just before calling `this.toggleActivityStream();` ?

::: browser/components/newtab/aboutNewTabService.js:139
(Diff revision 1)
>      if (stateEnabled) {
>        this._activityStreamEnabled = true;
>      } else {
>        this._activityStreamEnabled = false;
>      }
> +    this._activityStreamPrerender = Services.prefs.getBoolPref(PREF_ACTIVITY_STREAM_PRERENDER_ENABLED);

The constructor does call `toggleActivityStream` but we should already be updating this state when the pref actually changes. Any reason not to just initialize correctly from the constructor?
Attachment #8908632 - Flags: review?(edilee) → review+
(Assignee)

Updated

3 months ago
Assignee: nobody → khudson
(Assignee)

Comment 8

3 months ago
mozreview-review-reply
Comment on attachment 8908632 [details]
Bug 1399696 - aboutNewTabService should initialize with the correct _activityStreamPrerender value

https://reviewboard.mozilla.org/r/180300/#review185458

> The constructor does call `toggleActivityStream` but we should already be updating this state when the pref actually changes. Any reason not to just initialize correctly from the constructor?

The pref can start off being different on browser initialization (i.e. from previous changes to the pref), which will never trigger the observer
(Assignee)

Comment 9

3 months ago
mozreview-review-reply
Comment on attachment 8908632 [details]
Bug 1399696 - aboutNewTabService should initialize with the correct _activityStreamPrerender value

https://reviewboard.mozilla.org/r/180300/#review185458

To be honest I think specifically initializing values in the constructor would make more sense than adding to toggleActivityStream, but I didn't want to do any refactoring considering we're pretty close to the cut-off

Comment 10

3 months ago
Pushed by khudson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ad95439eef6
aboutNewTabService should initialize with the correct _activityStreamPrerender value r=Mardak
https://hg.mozilla.org/mozilla-central/rev/2ad95439eef6
Status: NEW → RESOLVED
Last Resolved: 3 months ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57

Updated

3 months ago
Duplicate of this bug: 1400082

Updated

3 months ago
Blocks: 1394533
You need to log in before you can comment on or make changes to this bug.