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

Ads rewards are not refreshed after claiming an ad grant #10094

Closed
tmancey opened this issue Jun 4, 2020 · 2 comments · Fixed by brave/brave-core#5748
Closed

Ads rewards are not refreshed after claiming an ad grant #10094

tmancey opened this issue Jun 4, 2020 · 2 comments · Fixed by brave/brave-core#5748
Assignees
Labels

Comments

@tmancey
Copy link
Contributor

tmancey commented Jun 4, 2020

Description

Ads rewards are not reconciled with the server after claiming an ads grant. Ads rewards are only reconciled with the server if the user restarts the browser or after ~24 hours when cashing out tokens

Steps to Reproduce

  1. Launch browser (clean profile)
  2. View an ad
  3. Request an ads grant from server team for your wallet payment id (should not use restore wallet as restoring a wallet restores other meta data)
  4. Claim the ad grant

Actual result:

Estimated pending rewards are not reconciled with the server until the user restarts the browser or tokens are cashed-in ~24 hours.

Expected result:

Estimated pending rewards should be reconciled with the server (search for OnGetPayments in 1.14.x or above or OnGetPaymentBalance in older builds and OnGetAdGrants (due to an error this may be OnGetGrants) in the diagnostic log and confirm the server returned 2xx response codes and the values in the ads UI value are the same as what was shown after step 2)

Reproduces how often:

Easily reproduced

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

@tmancey tmancey added bug priority/P3 The next thing for us to work on. It'll ride the trains. QA/Yes feature/ads labels Jun 4, 2020
@tmancey tmancey self-assigned this Jun 4, 2020
@tmancey tmancey changed the title Ads rewards are not updated after claiming an ad grant Ads rewards are not refreshed after claiming an ad grant Jun 4, 2020
@tmancey tmancey added priority/P2 A bad problem. We might uplift this to the next planned release. release-notes/include and removed priority/P3 The next thing for us to work on. It'll ride the trains. labels Jun 5, 2020
@tmancey tmancey added this to the 1.12.x - Nightly milestone Jun 5, 2020
@tmancey tmancey added OS/Android Fixes related to Android browser functionality OS/Desktop labels Aug 5, 2020
@LaurenWags
Copy link
Member

LaurenWags commented Aug 10, 2020

Verified passed using macOS 10.14.6 x64 Mojave

Brave | 1.12.108 Chromium: 84.0.4147.105 (Official Build) (64-bit)
-- | --
Revision | a6b12dfad6663f13a7e16e9a42a6a4975374096b-refs/branch-heads/4147@{#943}
OS | macOS Version 10.14.6 (Build 18G3020)
  • Verified STR from description
  • Confirmed logs got 2xx's as expected
[8446:775:0810/134429.870586:VERBOSE1:ads_rewards.cc(117)] OnGetPaymentBalance
[8446:775:0810/134429.870660:VERBOSE6:ads_rewards.cc(119)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/payment/6b46cb43-3b15-4dd1-a0d3-d4f42cae9b95
  Response Status Code: 200
[8446:775:0810/134429.985145:VERBOSE1:ads_rewards.cc(152)] OnGetAdGrants
[8446:775:0810/134429.985224:VERBOSE6:ads_rewards.cc(154)] URL Response:
  URL: https://grant.rewards.bravesoftware.com/v1/promotions/ads/grants/summary?paymentId=6b46cb43-3b15-4dd1-a0d3-d4f42cae9b95
  Response Status Code: 200
  • Confirmed UI displayed as expected after claiming Ad grant:

Screen Shot 2020-08-10 at 1 45 38 PM


Verified passed using

Brave	1.12.108 Chromium: 84.0.4147.105 (Official Build) (64-bit)
Revision	a6b12dfad6663f13a7e16e9a42a6a4975374096b-refs/branch-heads/4147@{#943}
OS	Linux
  • Verified STR from description
  • Confirmed logs got 2xx's as expected
[4648:4648:0810/104046.668781:VERBOSE1:ads_rewards.cc(117)] OnGetPaymentBalance
[4648:4648:0810/104046.668813:VERBOSE6:ads_rewards.cc(119)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/payment/cf972932-452b-428c-9005-38ac279d463c
  Response Status Code: 200
[4648:4648:0810/104046.781206:VERBOSE1:ads_rewards.cc(152)] OnGetAdGrants
[4648:4648:0810/104046.781238:VERBOSE6:ads_rewards.cc(154)] URL Response:
  URL: https://grant.rewards.bravesoftware.com/v1/promotions/ads/grants/summary?paymentId=cf972932-452b-428c-9005-38ac279d463c
  Response Status Code: 200
  Body: {"amount":"20","earnings":"20","lastClaim":"2020-08-10T17:35:22.480147Z","type":"ads"}
  • Confirmed UI displayed as expected after claiming Ad grant:

Screen Shot 2020-08-10 at 1 46 14 PM


Verification PASSED on macOS 10.15.6 x64 using the following build:

Brave 1.12.108 Chromium: 84.0.4147.105 (Official Build) (64-bit)
-- | --
Revision  | a6b12dfad6663f13a7e16e9a42a6a4975374096b-refs/branch-heads/4147@{#943}
OS  | macOS Version 10.15.6 (Build 19G73)
  • Verified STR from description
  • Confirmed logs got 2xx's as expected

Screen Shot 2020-08-10 at 1 51 04 PM

[Aug 10, 2020, 1:50:42.5 PM:INFO:ads_rewards.cc(117)] OnGetPaymentBalance
[Aug 10, 2020, 1:50:42.5 PM:VERBOSE6:ads_rewards.cc(119)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/payment/9f192235-8e55-41c6-bb9b-5dc8844a1da5
  Response Status Code: 200
  Body: [{"balance":"0","month":"2020-08","transactionCount":"0"}]
  Headers:
    accept-ranges: bytes
    access-control-allow-origin: *
    content-length: 58
    content-type: application/json; charset=utf-8
    date: Mon, 10 Aug 2020 17:50:42 GMT
    status: 200
    vary: Accept-Encoding
    via: 1.1 varnish
    x-cache: MISS
    x-cache-hits: 0
    x-served-by: cache-yyz4541-YYZ
[Aug 10, 2020, 1:50:42.6 PM:INFO:ads_rewards.cc(152)] OnGetAdGrants
[Aug 10, 2020, 1:50:42.6 PM:VERBOSE6:ads_rewards.cc(154)] URL Response:
  URL: https://grant.rewards.bravesoftware.com/v1/promotions/ads/grants/summary?paymentId=9f192235-8e55-41c6-bb9b-5dc8844a1da5
  Response Status Code: 200
  Body: {"amount":"20","earnings":"20","lastClaim":"2020-08-10T17:43:15.033876Z","type":"ads"}

  Headers:
    accept-ranges: bytes
    content-length: 87
    content-type: application/json
    date: Mon, 10 Aug 2020 17:50:42 GMT
    request-id: bsoohsglsed8tvfs1cu0
    status: 200
    via: 1.1 varnish
    x-cache: MISS
    x-cache-hits: 0
    x-ratelimit-limit: 1
    x-ratelimit-remaining: 0
    x-ratelimit-reset: 1
    x-request-id: 6LSx1QQXzXdBmk48
    x-served-by: cache-yyz4538-YYZ

Verification PASSED on Win 10 x64 using the following build:

Brave | 1.12.108 Chromium: 84.0.4147.105 (Official Build) (64-bit)
--- | ---
Revision | a6b12dfad6663f13a7e16e9a42a6a4975374096b-refs/branch-heads/4147@{#943}
OS | Windows 10 OS Version 2004 (Build 19041.388)

Annotation 2020-08-10 135917

[Aug 10, 2020, 1:58:59.3 PM:INFO:ads_rewards.cc(117)] OnGetPaymentBalance
[Aug 10, 2020, 1:58:59.3 PM:VERBOSE6:ads_rewards.cc(119)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/payment/836f468d-689c-4621-b1e9-0538ecb61a69
  Response Status Code: 200
  Body: [{"balance":"0","month":"2020-08","transactionCount":"0"}]
  Headers:
    accept-ranges: bytes
    access-control-allow-origin: *
    content-length: 58
    content-type: application/json; charset=utf-8
    date: Mon, 10 Aug 2020 17:58:56 GMT
    status: 200
    vary: Accept-Encoding
    via: 1.1 varnish
    x-cache: MISS
    x-cache-hits: 0
    x-served-by: cache-yyz4537-YYZ
[Aug 10, 2020, 1:58:59.4 PM:INFO:ads_rewards.cc(152)] OnGetAdGrants
[Aug 10, 2020, 1:58:59.4 PM:VERBOSE6:ads_rewards.cc(154)] URL Response:
  URL: https://grant.rewards.bravesoftware.com/v1/promotions/ads/grants/summary?paymentId=836f468d-689c-4621-b1e9-0538ecb61a69
  Response Status Code: 200
  Body: {"amount":"20","earnings":"20","lastClaim":"2020-08-10T17:43:15.033876Z","type":"ads"}
  Headers:
    accept-ranges: bytes
    content-length: 87
    content-type: application/json
    date: Mon, 10 Aug 2020 17:58:57 GMT
    request-id: bsoolo0lsed8tvfs1dkg
    status: 200
    via: 1.1 varnish
    x-cache: MISS
    x-cache-hits: 0
    x-ratelimit-limit: 1
    x-ratelimit-remaining: 0
    x-ratelimit-reset: 1
    x-request-id: 7WqMF8bpdq2JEvvW
    x-served-by: cache-yyz4546-YYZ

@srirambv
Copy link
Contributor

Verification passed on OnePlus 6T with Android 10 running 1.12.113 x64 build

  • Verified steps from issue description
  • Verified logs got 2xx's as expected
    • OnGetPaymentBalance
      image

    • OnGetAdGrants
      image

  • Verified UI shows ad grant notification
    image

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

Successfully merging a pull request may close this issue.

4 participants