Closed Bug 1314650 Opened 8 years ago Closed 8 years ago

Fix the "Unknown source for one-off search: urlbar" error when doing one-off searches

Categories

(Firefox :: Search, defect, P1)

defect
Points:
1

Tracking

()

RESOLVED FIXED
Firefox 52
Tracking Status
firefox51 --- fixed
firefox52 --- fixed

People

(Reporter: Dexter, Assigned: Dexter)

References

Details

(Whiteboard: [measurement:client])

Attachments

(1 file, 1 obsolete file)

> Unknown source for one-off search: urlbar BrowserUsageTelemetry.jsm:276 This is happening due to the code that landed in bug 1303333. The counts from the one-off searches originating from the urlbar or the searchbar are still being counted (checked in about:telemetry). However, this exception is thrown because the search code calls BrowserUsageTelemetry.recordSearch twice: one time flagging the search as a one-off, the other time marking it as a normal search. As a consequence, BrowserUsageTelemetry.recordSearch throws.
Assignee: nobody → alessio.placitelli
Blocks: 1303333
Points: --- → 1
Priority: -- → P1
Whiteboard: [measurement:client]
Attached patch bug1314650.patch (obsolete) (deleted) — Splinter Review
This simply drops the exception if it comes from the 'urlbar' or 'searchbar', as they're the ones calling the function twice.
Attachment #8806789 - Flags: review?(mak77)
Comment on attachment 8806789 [details] [diff] [review] bug1314650.patch Review of attachment 8806789 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/modules/BrowserUsageTelemetry.jsm @@ +274,5 @@ > if (isOneOff) { > if (!KNOWN_ONEOFF_SOURCES.includes(source)) { > + // Silently drop the error if this bogus call > + // came from 'urlbar' or 'searchbar'. They're buggy > + // and are calling |recordSearch| twice. If we're calling them buggy, we'd better add here the bug # that is going to solve the problem, otherwise future readers will have to figure that out every time.
Attachment #8806789 - Flags: review?(mak77) → review+
Attached patch bug1314650.patch (deleted) — Splinter Review
I changed the comment to explain the situation rather than claiming the code is buggy.
Attachment #8806789 - Attachment is obsolete: true
Attachment #8807240 - Flags: review+
Keywords: checkin-needed
Pushed by ihsiao@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/43b69e748e78 Fix the "Unknown source for one-off search: urlbar" error when doing one-off searches. r=mak
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Comment on attachment 8807240 [details] [diff] [review] bug1314650.patch Approval Request Comment [Feature/regressing bug #]: Bug 1303333. [User impact if declined]: The browser console will show an exception even though no error really occurred. [Describe test coverage new/current, TreeHerder]: Test coverage is already in place from bug 1303333. [Risks and why]: No risk, as this basically mutes an exception. [String/UUID change made/needed]: None.
Attachment #8807240 - Flags: approval-mozilla-aurora?
Hi Alessio, I remember that one-off search is enabled in nightly only. Do we need to uplift this to 51 aurora?
Flags: needinfo?(alessio.placitelli)
(In reply to Gerry Chang [:gchang] from comment #8) > Hi Alessio, > I remember that one-off search is enabled in nightly only. Do we need to > uplift this to 51 aurora? Hi Gerry! Yes please, let's uplift that too so that the code is in sync in case any weird issue arises.
Flags: needinfo?(alessio.placitelli)
Comment on attachment 8807240 [details] [diff] [review] bug1314650.patch Fix an error in browser console related to one-off search. Take it in 51 aurora.
Attachment #8807240 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: