Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial DAU Ping Sent without Ref Code when Not using Clipboard #2586

Open
LaurenWags opened this issue May 27, 2020 · 1 comment
Open

Initial DAU Ping Sent without Ref Code when Not using Clipboard #2586

LaurenWags opened this issue May 27, 2020 · 1 comment
Assignees
Milestone

Comments

@LaurenWags
Copy link

@LaurenWags LaurenWags commented May 27, 2020

Description:

Found while testing #2535

When running thru Fallback to Standard System test case from above PR, my DAU ping was sent without my promo code. Per internal discussions (https://bravesoftware.slack.com/archives/C06UXF3KJ/p1590597370287800), it seems this is likely because the ping was sent before the ref code was obtained (and thus, not shown in the logs). It's possibly a race condition not accounted for.

Note - while testing other scenarios in this PR (such as Clipboard Full Test), DAU ping was displayed in logs and did contain ref code.

Steps to Reproduce

  1. Visit normal referral page (not SR)
  2. Click Download
  3. Download Brave through TF
  4. Open Brave
  5. Verify that correct ref code shows up in settings
  6. Open URP logs (only available on dev TF build)

Actual result:
No ping displayed: (note - this was discussed and a ping is being sent, but because it does not contain the URP code is not shown in logs)
Scenario3-Fallback to Standard System

Expected result:
Ping:
Scenario2 - ClipboardFullTest

Reproduces how often: [Easily reproduced, Intermittent Issue]
easily with this scenario

Brave Version:
1.17 (20.05.27.15)

Device details:
iPad iOS12

Website problems only:

  • did you check with Brave Shields down?
  • did you check in Safari/Firefox (WkWebView-based browsers)?

Additional Information

@jhreis jhreis changed the title sometimes initial DAU ping sent without ref code Initial DAU Ping Sent without Ref Code when using Clipboard May 27, 2020
@jhreis jhreis changed the title Initial DAU Ping Sent without Ref Code when using Clipboard Initial DAU Ping Sent without Ref Code when Not using Clipboard May 27, 2020
@jhreis
Copy link
Contributor

@jhreis jhreis commented May 27, 2020

On implementation, we should only perform a DAU ping when Preferences.URP.referralLookupOutstanding.value is false.

If it is true, perform normal DAU ping, otherwise do not.

After URP server request is made (either to the /ua or /nonua endpoint), wait until referralLookupOutstanding is set, then perform the ping. On subsequent launches the launch check should handle subsequent DAU pings.

@jhreis jhreis added this to the 1.18 milestone May 27, 2020
@anthonypkeane anthonypkeane modified the milestones: 1.18, 1.19 Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.