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

Unblinded tokens are not fetched till restart after invalid wallet error even when wallet state is fixed #22654

Closed
btlechowski opened this issue May 2, 2022 · 2 comments · Fixed by brave/brave-core#13499

Comments

@btlechowski
Copy link

btlechowski commented May 2, 2022

Follow up to #13815.

Important: This state is fixed after browser restart

Steps to Reproduce

Important: OS locale and actual geolocation need to be the same, for example: US locale and US based IP.

  1. Install 1.19.86
  2. Enable rewards and ads
  3. Update to 1.39.x
  4. Wait till unblinded tokens are downloaded
  5. View a NTP SI
  6. Make sure user is paid for the ad (view confirmation is successful)

Actual result:

unblinded tokens are never refilled, the reason is:

[9428:9428:0502/175033.529794:INFO:refill_unblinded_tokens.cc(88)] Failed to refill unblinded tokens due to an invalid wallet

The invalid wallet state is fixed, but we never retry to refill unblinded tokens

[9428:9428:0502:0502/191949.346549:VERBOSE1:ads_impl.cc(787)] Successfully set wallet
[9428:9428:0502:0502/191949.351143:VERBOSE1:ads_impl.cc(787)] Successfully set wallet

Note: restart fixes the issue and unblinded tokens are refilled.

Expected result:

User is paid for NTP SI without restart

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave 1.39.87 Chromium: 101.0.4951.41 (Official Build) beta (64-bit)
Revision 93c720db8323b3ec10d056025ab95c23a31997c9-refs/branch-heads/4951@{#904}
OS Ubuntu 18.04 LTS

cc @brave/qa-team @rebron @tmancey @jsecretan

@LaurenWags
Copy link
Member

Using STR this did not reproduce on macOS for me, my tokens were refilled:

[5956:259:0504/110429.630586:VERBOSE1:refill_unblinded_tokens.cc(322)] Added 50 unblinded tokens, you now have 50 unblinded tokens

Using:

Brave | 1.39.89 Chromium: 101.0.4951.41 (Official Build) beta (x86_64)
-- | --
Revision | 93c720db8323b3ec10d056025ab95c23a31997c9-refs/branch-heads/4951@{#904}
OS | macOS Version 12.3.1 (Build 21E258)

@LaurenWags
Copy link
Member

Verified using

Brave | 1.41.86 Chromium: 103.0.5060.66 (Official Build) beta (x86_64)
-- | --
Revision | 20b1569438a85e631d15e83eb355e3e326e5da6f-refs/branch-heads/5060@{#1066}
OS | macOS Version 12.4 (Build 21F79)

Verified STR from description.
After "upgrading" to 1.41.x,

  • Wallet state fixed
[92579:259:0630/121909.025359:VERBOSE1:ads_impl.cc(784)] Successfully set wallet
  • Tokens refilled (without browser restart)
[92579:259:0630/121927.777182:VERBOSE1:refill_unblinded_tokens.cc(337)] Added 50 unblinded tokens, you now have 50 unblinded tokens
[92579:259:0630/121927.777223:VERBOSE1:account.cc(300)] Successfully refilled unblinded tokens
  • Confirmed able to view NTP ad
[92579:259:0630/121956.762883:VERBOSE3:new_tab_page_ad_event_served.cc(23)] Served new tab page ad with placement id 12c9e629-af99-4ae5-8a89-8a1b4b52299a and creative instance id 884ea0d0-08dd-480a-b61a-3bc35e261456
[92579:259:0630/121956.764559:VERBOSE3:ads_impl.cc(804)] Successfully processed deposit for new_tab_page_ad with creative instance id 884ea0d0-08dd-480a-b61a-3bc35e261456 and view valued at 0.01
[92579:259:0630/121956.764650:VERBOSE1:confirmations.cc(61)] Confirming view for new_tab_page_ad with transaction id f8ec0c4a-0fd6-4907-ab73-d0c45e9efbe6 and creative instance id 884ea0d0-08dd-480a-b61a-3bc35e261456
  • Confirmed paid for NTP view:
[92579:259:0630/122004.399071:VERBOSE1:confirmations.cc(303)] Successfully redeemed unblinded token for new_tab_page_ad with confirmation id d6b53e29-e60b-4d54-a54e-eaa3e32cc3bf, transaction id f8ec0c4a-0fd6-4907-ab73-d0c45e9efbe6, creative instance id 884ea0d0-08dd-480a-b61a-3bc35e261456 and view. You now have 1 unblinded payment tokens which will be redeemed in 0 hours, 0 minutes, 0 seconds at 12:19:06.313

@LaurenWags LaurenWags added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment