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

Unable to get ad tokens if tokens are not ready with 1.3.x, 1.4.x and 1.5.x #7666

Closed
LaurenWags opened this issue Jan 8, 2020 · 4 comments · Fixed by brave/brave-core#4334

Comments

@LaurenWags
Copy link
Member

LaurenWags commented Jan 8, 2020

Description

When launching 1.3.x, 1.4.x or 1.5.x with a clean profile via terminal (with flags) I can see that I get the following message:

[11022:775:0107/121325.957157:ERROR:refill_tokens.cc(260)] Failed to verify and unblind tokens

and then a bit further down you will see a Failed to refill tokens message.

Because I can't get ad tokens, I can't receive ad notifications.

Steps to Reproduce

  1. Launch 1.3.x with clean profile and the following flags: --enable-logging=stderr --vmodule=brave_ads=3 --log-level=2 --rewards=staging=true --brave-ads-staging (note, you don't need the staging flags, this reproduces with production as well)
  2. Enable Rewards
  3. Watch terminal

Actual result:

attempts to get ad tokens are made, but ad tokens are not verified as per message above.

Expected result:

should be getting ad tokens so ad notifications can be received.

Reproduces how often:

easily (intermittent for @tmancey) however every time for @NejcZdovc and @LaurenWags

Brave version (brave://version info)

Brave 1.3.86 Chromium: 79.0.3945.88 (Official Build) beta (64-bit)
Revision c2a58a36b9411c80829b4b154bfcab97e581f1f3-refs/branch-heads/3945@{#954}
OS macOS Version 10.14.6 (Build 18G103)

Version/Channel Information:

  • Can you reproduce this issue with the current release? n/a with 1.2.x
  • Can you reproduce this issue with the beta channel? yes with 1.3.x
  • Can you reproduce this issue with the dev channel? yes with 1.4.x
  • Can you reproduce this issue with the nightly channel? yes with 1.5.x

Other Additional Information:

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

Miscellaneous Information:

cc @tmancey @rebron @kjozwiak @jsecretan
reproduced on Linux by @btlechowski

@LaurenWags
Copy link
Member Author

@btlechowski
Copy link

Reproduced on Ubuntu 18.04 LTS

Brave 1.2.42 Chromium: 79.0.3945.117 (Official Build) (64-bit)
Revision 04f0a055010adab4484f7497fbfdbf312c307f1d-refs/branch-heads/3945@{#1019}
OS Ubuntu 18.04 LTS

chrome_debug.log

@tmancey tmancey added the priority/P1 A very extremely bad problem. We might push a hotfix for it. label Jan 8, 2020
@tmancey tmancey modified the milestones: 1.3.x - Beta, 1.5.x - Nightly Jan 8, 2020
@tmancey tmancey added the bug label Jan 8, 2020
@tmancey tmancey changed the title unable to get ad tokens with 1.3.x Unable to get ad tokens with 1.3.x, 1.4.x and 1.5.x Jan 8, 2020
@tmancey tmancey self-assigned this Jan 8, 2020
@tmancey tmancey changed the title Unable to get ad tokens with 1.3.x, 1.4.x and 1.5.x Unable to get ad tokens if tokens are not ready with 1.3.x, 1.4.x and 1.5.x Jan 8, 2020
@LaurenWags
Copy link
Member Author

Removing QA/Blocked as this can be tested on 1.3.92 and above

@LaurenWags
Copy link
Member Author

LaurenWags commented Jan 15, 2020

Verified passed with

Brave 1.3.92 Chromium: 79.0.3945.117 (Official Build) beta (64-bit)
Revision 04f0a055010adab4484f7497fbfdbf312c307f1d-refs/branch-heads/3945@{#1019}
OS macOS Version 10.14.6 (Build 18G103)

Verification passed on

Brave 1.3.92 Chromium: 79.0.3945.117 (Official Build) beta (64-bit)
Revision 04f0a055010adab4484f7497fbfdbf312c307f1d-refs/branch-heads/3945@{#1019}
OS Ubuntu 18.04 LTS

Verification passed on

Brave 1.3.92 Chromium: 79.0.3945.117 (Official Build) beta (64-bit)
Revision 04f0a055010adab4484f7497fbfdbf312c307f1d-refs/branch-heads/3945@{#1019}
OS Windows 10 OS Version 1803 (Build 17134.1006)
  • Verified on a clean profile: verified ad tokens were received and I was able to view an ad notification
  • Verified on upgraded profile also

Ensured that 50 unblinded tokens were added as per the following:

[2528:12152:0116/140624.307:INFO:confirmations_impl.cc(690)] Saving confirmations state
[2528:12152:0116/140624.307:INFO:refill_tokens.cc(300)] Added 50 unblinded tokens, you now have 50 unblinded tokens
[2528:12152:0116/140624.307:INFO:confirmations_impl.cc(690)] Saving confirmations state
[2528:12152:0116/140624.307:INFO:refill_tokens.cc(325)] Successfully refilled tokens
[2528:12152:0116/140624.319:INFO:confirmations_impl.cc(708)] Successfully saved confirmations state
[2528:12152:0116/140624.328:INFO:confirmations_impl.cc(708)] Successfully saved confirmations state

Viewed an Ad

[2456:6828:0116/140901.051:INFO:ads_impl.cc(1093)] Serving ad from parent categories:
[2456:6828:0116/140901.051:INFO:ads_impl.cc(1095)]   technology & computing
[2456:6828:0116/140901.051:INFO:ads_impl.cc(1095)]   business
[2456:6828:0116/140901.052:INFO:ads_impl.cc(1057)] Found 6 eligible ads
[2456:6828:0116/140901.052:INFO:ads_impl.cc(1305)] Ad notification shown:
  id: 85a5541b-c51a-4e9a-892c-2528958c365e
  campaign_id: 298af3f5-814c-4ae8-8abf-bbbf556240dd
  advertiser: Honey
  category: technology & computing
  text: Shop Smarter With This Genius Extension
  url: https://www.joinhoney.com/page/DR-UK-Evergreen-Simplified-Yellow/?utm_source=bsad&utm_medium=dis&utm_campaign=BSAD_UK_191230_Brave_CPC_NA_Evergreen_ShopSmarter_All_All_All_All_DR-UK-Evergreen-Simplified-Yellow&utm_content=DR-UK-Evergreen-Simplified-Yellow&from=r
  uuid: 5353428c-38bb-4166-b3d2-4f16779b6dde
[2456:6828:0116/140901.052:INFO:notifications.cc(262)] Saving notifications state
[2528:12152:0116/140901.053:INFO:confirmations_impl.cc(1038)] Confirm ad:
  id: 85a5541b-c51a-4e9a-892c-2528958c365e
  creative_set_id: 51c4f907-d496-4fc9-ae21-9abc58cfb789
  advertiser: Honey
  category: technology & computing
  text: Shop Smarter With This Genius Extension
  url: https://www.joinhoney.com/page/DR-UK-Evergreen-Simplified-Yellow/?utm_source=bsad&utm_medium=dis&utm_campaign=BSAD_UK_191230_Brave_CPC_NA_Evergreen_ShopSmarter_All_All_All_All_DR-UK-Evergreen-Simplified-Yellow&utm_content=DR-UK-Evergreen-Simplified-Yellow&from=r
  uuid: 5353428c-38bb-4166-b3d2-4f16779b6dde
  type: view

Once an ad was viewed, ensured that an unblinded payment token was created with a redemption value

[2528:12152:0116/140915.170:INFO:confirmations_impl.cc(690)] Saving confirmations state
[2528:12152:0116/140915.170:INFO:redeem_token.cc(407)] Added 1 unblinded payment token with an estimated redemption value of 0.05 BAT, you now have 2 unblinded payment tokens
[2528:12152:0116/140915.170:INFO:confirmations_impl.cc(690)] Saving confirmations state

Ensured that Refill is correctly working as per

[2528:12152:0116/140901.054:INFO:refill_tokens.cc(50)] Refill
[2528:12152:0116/140901.054:INFO:refill_tokens.cc(75)] RequestSignedTokens
[2528:12152:0116/140901.054:INFO:refill_tokens.cc(78)] No need to refill tokens as we already have 49 unblinded tokens which is above the minimum threshold of 20

Verified tokens are paid out successfully

[12944:16520:0116/150740.551:INFO:payout_tokens.cc(122)] Successfully paid out tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants