Closed Bug 1553205 Opened 1 year ago Closed 1 year ago

FxA metrics values sometimes don't get set


(Firefox :: Messaging System, defect, P1)




Firefox 69
69.1 - May 13 - 26
Tracking Status
firefox67 --- wontfix
firefox67.0.1 --- verified
firefox68 + verified
firefox69 --- verified


(Reporter: Mardak, Assigned: Mardak)



(Keywords: github-merged)


(4 files)

stomlinson has been frequently running into missing flow/device_id. After some debugging, it looks like from componentWillMount, this.props.fxaEndpoint is undefined:

  async componentWillMount() {
    if (this.props.fxaEndpoint && !this.fxaMetricsInitialized) {
        const url = new URL(`${this.props.fxaEndpoint}/metrics-flow?entrypoint=activity-stream-firstrun&form_type=email`);

Curiously, from render where we also use this.props.fxaEndpoint he does see the form with the correct action:

          <form method="get" action={this.props.fxaEndpoint} target="_blank" rel="noopener noreferrer" onSubmit={this.onSubmit}>

React is getting rid of componentWillMount and seem to be recommending doing fetches from componentDidMount:

I and others can't seem to reproduce the issue.

Attached image try logging

stomlinson, I have a try mac build with a potential fix and logging with the attached console output for me, but i’m guessing sometimes for you the first line for "will mount” doesn’t have the url

try run:

direct dmg:

Can you run that and see if it fixes the bug for you?

Flags: needinfo?(stomlinson)

We'll hope this fixes things for shane and land a potential fix now.

Assignee: nobody → edilee
Blocks: 1550861
Iteration: --- → 69.1 - May 13 - 26
Priority: -- → P1

One way to reproduce this issue is to set browser.newtabpage.activity-stream.prerender to true then open about:welcome and check that the form hidden input don't have flow values.

Flags: needinfo?(stomlinson)
Blocks: 1553334
Closed: 1 year ago
Keywords: github-merged
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
See Also: → 1553375

I have verified that this issue is no longer reproducible with the latest Firefox Nightly (69.0a1 Build ID - 20190522152821) installed, on Windows 10 x64, Arch Linux and Mac 10.14.5. Now, the hidden input forms have flow values.

Blocks: 1552282
Duplicate of this bug: 1554102
No longer blocks: 1552282

[Tracking Requested - why for this release]: Moving tracking from meta to the 2 individual bugs that made it to 67.0.5 and 69 but not 68

Comment on attachment 9070340 [details]
Bug 1553205 - FxA metrics values sometimes don't get set

Beta/Release Uplift Approval Request

  • User impact if declined: Fxa account creations would lack attribution affecting metrics
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Comment 4
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small refactoring change to more consistently fetch metrics and already verified on both 69 and 67
  • String changes made/needed: none
Attachment #9070340 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9070340 [details]
Bug 1553205 - FxA metrics values sometimes don't get set

approved for 68.0b11

Attachment #9070340 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified - Fixed in latest Beta 68.0b11 on Windows 10 x64, Mac OS 10.14 and Ubuntu 18.04.

QA Whiteboard: [qa-triaged]

Verified - Fixed in candidates 67.0.3 Build ID 20190618025334, on Windows 10 x64, Mac OS 10.14 and Ubuntu 18.04.

QA Whiteboard: [qa-triaged]
Flags: qe-verify+
Component: Activity Streams: Newtab → Messaging System
You need to log in before you can comment on or make changes to this bug.