Skip to content

Fix Brave Ads race condition when users reset their Brave Rewards wallet #23247

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

Closed
tmancey opened this issue Jun 4, 2022 · 1 comment · Fixed by brave/brave-core#13614
Closed
Assignees

Comments

@tmancey
Copy link
Contributor

tmancey commented Jun 4, 2022

Description

Fix Brave Ads race condition when users reset their Brave Rewards wallet due to refill tokens before the wallet has fully reset associated ad state.

Steps to Reproduce

  1. Reset Brave Rewards wallet

Actual result:

Race condition could occur where the first token refill is cleared and a user would need to wait for a subsequent token refill

Expected result:

First token refill should top up the users tokens

Reproduces how often:

Intermittent issue (edge case which would be very rare)

Brave version (brave://version info)

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Yes
  • Can you reproduce this issue with the nightly channel? Yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? N/A
  • Is the issue reproducible on the latest version of Chrome? N/A

Miscellaneous Information:

@btlechowski
Copy link

Verification passed on

Brave 1.41.65 Chromium: 103.0.5060.42 (Official Build) nightly (64-bit)
Revision de0d840bf9439c31bd86bf74f065c31fdf9b208d-refs/branch-heads/5060@{#667}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#13614

Verified after resetting wallet, the unblinded tokens are refilled:

[16535:16535:0615/170023.097606:VERBOSE1:refill_unblinded_tokens.cc(337)] Added 50 unblinded tokens, you now have 50 unblinded tokens
[16535:16535:0615/170023.098313:VERBOSE1:account.cc(300)] Successfully refilled unblinded tokens


@tmancey tmancey added this to Ads Jun 10, 2024
@tmancey tmancey moved this to Done in Ads Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants