Closed Bug 1553205 Opened 5 months ago Closed 5 months ago

FxA metrics values sometimes don't get set

Categories

(Firefox :: Messaging System, defect, P1)

defect

Tracking

()

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

People

(Reporter: Mardak, Assigned: Mardak)

References

Details

(Keywords: github-merged)

Attachments

(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:

https://github.com/mozilla/activity-stream/blob/3e42f671b5ba812fbd55cb07240637a6dcc104ac/content-src/asrouter/templates/Trailhead/Trailhead.jsx#L53-L65

  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:

https://github.com/mozilla/activity-stream/blob/3e42f671b5ba812fbd55cb07240637a6dcc104ac/content-src/asrouter/templates/Trailhead/Trailhead.jsx#L255

          <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:
https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#fetching-external-data

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:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e111968ce7bdf293b38e25ea41f8b739807e1480
old https://treeherder.mozilla.org/#/jobs?repo=try&revision=88f86778e9da14a1b680afad8c7495beec384af4

direct dmg:
https://queue.taskcluster.net/v1/task/K64NfzETQFmsGX8uoZ0Mkw/runs/0/artifacts/public/build/target.dmg
old https://queue.taskcluster.net/v1/task/Mg6gilj0Tp-y5bdsueXlyA/runs/0/artifacts/public/build/target.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
Status: NEW → RESOLVED
Closed: 5 months 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.

Status: RESOLVED → VERIFIED
Blocks: 1552282
Duplicate of this bug: 1554102
No longer blocks: 1552282

[Tracking Requested - why for this release]: Moving tracking from meta https://bugzilla.mozilla.org/show_bug.cgi?id=1552282#a669715_580382 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.