Closed Bug 1806950 Opened 3 years ago Closed 3 years ago

JS error when attempting to send custom pings for navigational top picks

Categories

(Firefox :: Address Bar, defect, P1)

defect

Tracking

()

VERIFIED FIXED
110 Branch
Tracking Status
firefox110 --- verified
firefox111 --- verified

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

STR

  1. Set the following prefs:
    browser.ping-centre.log = true
    browser.urlbar.merino.providers = "adm,top_picks"
    browser.urlbar.quicksuggest.dataCollection.enabled = true
    
  2. Type redd in the urlbar
  3. Verify a Reddit top pick appears (its title is "Blocked" for some reason)
  4. Click it

This error is logged in the JS console (these line numbers might be off because I have some patches applied):

can't access property "toLocaleLowerCase", result.payload.sponsoredAdvertiser is undefined UrlbarProviderQuickSuggest.sys.mjs:611
    _recordEngagementTelemetry resource:///modules/UrlbarProviderQuickSuggest.sys.mjs:611
    onEngagement resource:///modules/UrlbarProviderQuickSuggest.sys.mjs:419
    tryMethod resource:///modules/UrlbarUtils.sys.mjs:2056
    notifyEngagementChange resource:///modules/UrlbarProvidersManager.sys.mjs:340
    _internalRecord resource:///modules/UrlbarController.sys.mjs:1016
    record resource:///modules/UrlbarController.sys.mjs:840
    pickResult resource:///modules/UrlbarInput.sys.mjs:1133
    pickElement resource:///modules/UrlbarInput.sys.mjs:794
    on_mouseup resource:///modules/UrlbarView.sys.mjs:2714
    handleEvent resource:///modules/UrlbarView.sys.mjs:793
    (Async: EventListener.handleEvent)
    on_mousedown resource:///modules/UrlbarView.sys.mjs:2664
    handleEvent resource:///modules/UrlbarView.sys.mjs:793

We probably don't need to send pings for navigational top picks since they aren't sponsored? So we should either fix this error or just not send pings.

Assignee: nobody → adw
Status: NEW → ASSIGNED

This stops trying to send custom engagement pings for navigational
suggestions. That fixes the JS error that's due to the fact that these
suggestions don't have an advertiser. The purpose of these pings is to report
aggregate engagements to partners, and that's not applicable to navigational
suggestions, so not sending pings for these is OK.

I added browser_telemetry_navigationalSuggestions.js to ensure we're not sending
pings. This test will probably need to be substantially modified when we
implement all the required telemetry for navigational suggestions. That's
tracked in this Jira ticket and documented in the spec.

Until we implement that new telemetry, navigational suggestions are treated as
non-sponsored suggestions w/r/t telemetry, so I copied this file from
browser_telemetry_nonsponsored.js.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/578773f9b5a9 Don't send custom engagement pings for navigational suggestions. r=daleharvey
Regressions: 1809357
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch

STR for QA:

  • Please see comment 0
  • No JS error should appear
  • No ping should be sent and no ping centre message should be logged
Flags: qe-verify+
Flags: in-testsuite+

I have verified this issue on the latest Nightly 111.0a1 build (Build ID: 20230118095131) and the latest Beta 110.0b2 (Build ID: 20230117185909) on Windows 10 x64, macOS 12.4 and Linux Mint 20.1.

  • The JS error is no longer displayed in the browser console.
  • There are no pings displayed in the browser console after interacting with a navigational top pick.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: