Skip to content

[Rewards] Unable to turn on "Brave Rewards" from pop-up panel #30441

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
hffvld opened this issue May 18, 2023 · 3 comments
Closed

[Rewards] Unable to turn on "Brave Rewards" from pop-up panel #30441

hffvld opened this issue May 18, 2023 · 3 comments
Labels
bug feature/rewards OS/Android Fixes related to Android browser functionality priority/P4 Planned work. We expect to get to it "soon". QA/Yes

Comments

@hffvld
Copy link
Contributor

hffvld commented May 18, 2023

Description

Unable to turn on "Brave Rewards" from the pop-up panel

05-18 13:06:32.682 13294 13294 V chromium: [VERBOSE1:rewards_service_impl.cc(437)] Ledger process is already running
05-18 13:06:32.701 13294 13294 V chromium: [VERBOSE5:ledger_impl.h(288)] 
05-18 13:06:32.701 13294 13294 V chromium: [ REQUEST ]
05-18 13:06:32.701 13294 13294 V chromium: > URL: https://grant.rewards.bravesoftware.com/v4/wallets/0733fd6f-64d9-5794-ba37-97ae33233686
05-18 13:06:32.701 13294 13294 V chromium: > Method: PATCH
05-18 13:06:32.701 13294 13294 V chromium: > Content: {"geoCountry":"US"}
05-18 13:06:32.701 13294 13294 V chromium: > Content Type: application/json; charset=utf-8
05-18 13:06:32.701 13294 13294 V chromium: > Header digest: SHA-256=3qb2VxsOc3ttZ2t4p2mnCmhKFFOCcXpkoqc/iirXnIA=
05-18 13:06:32.701 13294 13294 V chromium: > Header signature: keyId="0733fd6f-64d9-5794-ba37-97ae33233686",algorithm="ed25519",headers="digest (request-target)",signature="VoPBy95Rq1TDC39QlzwvmiDEU8Z4fIqw4KNCtnpW4QDsM6bfMkKzZ0bFLPLQUCHGcRcm/KhYJKl8ypCE8MGRAA=="
05-18 13:06:32.701 13294 13294 V chromium: > Header accept: application/json
05-18 13:06:32.804 13294 13294 V chromium: [VERBOSE6:logging_util.cc(120)] 
05-18 13:06:32.804 13294 13294 V chromium: [ RESPONSE - OnResponse ]
05-18 13:06:32.804 13294 13294 V chromium: > Url: https://grant.rewards.bravesoftware.com/v4/wallets/0733fd6f-64d9-5794-ba37-97ae33233686
05-18 13:06:32.804 13294 13294 V chromium: > Result: Failure
05-18 13:06:32.804 13294 13294 V chromium: > HTTP Code: 409
05-18 13:06:32.804 13294 13294 V chromium: > Body: {"message":"error updating rewards wallet: error geo country has already been set for rewards wallet","code":409}
05-18 13:06:32.808 13294 13294 I chromium: [INFO:patch_wallets.cc(72)] geo_country already declared!
05-18 13:06:32.810 13294 13294 I chromium: [INFO:wallet_create.cc(108)] Failed to update Rewards wallet!
05-18 13:06:32.859 13294 13294 V chromium: [VERBOSE5:ledger_impl.h(288)] 
05-18 13:06:32.859 13294 13294 V chromium: [ REQUEST ]
05-18 13:06:32.859 13294 13294 V chromium: > URL: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=0733fd6f-64d9-5794-ba37-97ae33233686&platform=android
05-18 13:06:32.859 13294 13294 V chromium: > Method: GET
05-18 13:06:32.883 13294 13294 V chromium: [VERBOSE6:logging_util.cc(120)] 
05-18 13:06:32.883 13294 13294 V chromium: [ RESPONSE - OnRequest ]
05-18 13:06:32.883 13294 13294 V chromium: > Url: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=0733fd6f-64d9-5794-ba37-97ae33233686&platform=android
05-18 13:06:32.883 13294 13294 V chromium: > Result: Success
05-18 13:06:32.883 13294 13294 V chromium: > HTTP Code: 200
05-18 13:06:32.883 13294 13294 V chromium: > Body: {"promotions":[{"id":"962abffd-4952-40cd-b90d-05868e233828","createdAt":"2023-04-12T09:53:03.111618Z","expiresAt":"2023-08-12T09:53:03.111618Z","version":5,"suggestionsPerGrant":120,"approximateValue":"30","type":"ugp","available":true,"platform":"android","publicKeys":["EuFcLm2oFoF1g6QGgozCcYkmslWy6eap+lXuD8XuGEw="],"legacyClaimed":false,"claimableUntil":"2023-07-12T09:53:03.111618Z"}]}
05-18 13:06:40.785 13294 13294 V chromium: [VERBOSE1:rewards_service_impl.cc(437)] Ledger process is already running
05-18 13:06:40.804 13294 13294 V chromium: [VERBOSE5:ledger_impl.h(288)] 
05-18 13:06:40.804 13294 13294 V chromium: [ REQUEST ]
05-18 13:06:40.804 13294 13294 V chromium: > URL: https://grant.rewards.bravesoftware.com/v4/wallets/0733fd6f-64d9-5794-ba37-97ae33233686
05-18 13:06:40.804 13294 13294 V chromium: > Method: PATCH
05-18 13:06:40.804 13294 13294 V chromium: > Content: {"geoCountry":"US"}
05-18 13:06:40.804 13294 13294 V chromium: > Content Type: application/json; charset=utf-8
05-18 13:06:40.804 13294 13294 V chromium: > Header digest: SHA-256=3qb2VxsOc3ttZ2t4p2mnCmhKFFOCcXpkoqc/iirXnIA=
05-18 13:06:40.804 13294 13294 V chromium: > Header signature: keyId="0733fd6f-64d9-5794-ba37-97ae33233686",algorithm="ed25519",headers="digest (request-target)",signature="VoPBy95Rq1TDC39QlzwvmiDEU8Z4fIqw4KNCtnpW4QDsM6bfMkKzZ0bFLPLQUCHGcRcm/KhYJKl8ypCE8MGRAA=="
05-18 13:06:40.804 13294 13294 V chromium: > Header accept: application/json
05-18 13:06:40.868 13294 13294 V chromium: [VERBOSE6:logging_util.cc(120)] 
05-18 13:06:40.868 13294 13294 V chromium: [ RESPONSE - OnResponse ]
05-18 13:06:40.868 13294 13294 V chromium: > Url: https://grant.rewards.bravesoftware.com/v4/wallets/0733fd6f-64d9-5794-ba37-97ae33233686
05-18 13:06:40.868 13294 13294 V chromium: > Result: Failure
05-18 13:06:40.868 13294 13294 V chromium: > HTTP Code: 409
05-18 13:06:40.868 13294 13294 V chromium: > Body: {"message":"error updating rewards wallet: error geo country has already been set for rewards wallet","code":409}
05-18 13:06:40.871 13294 13294 I chromium: [INFO:patch_wallets.cc(72)] geo_country already declared!
05-18 13:06:40.874 13294 13294 I chromium: [INFO:wallet_create.cc(108)] Failed to update Rewards wallet!
05-18 13:06:40.918 13294 13294 V chromium: [VERBOSE5:ledger_impl.h(288)] 
05-18 13:06:40.918 13294 13294 V chromium: [ REQUEST ]
05-18 13:06:40.918 13294 13294 V chromium: > URL: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=0733fd6f-64d9-5794-ba37-97ae33233686&platform=android
05-18 13:06:40.918 13294 13294 V chromium: > Method: GET
05-18 13:06:40.936 13294 13294 V chromium: [VERBOSE6:logging_util.cc(120)] 
05-18 13:06:40.936 13294 13294 V chromium: [ RESPONSE - OnRequest ]
05-18 13:06:40.936 13294 13294 V chromium: > Url: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=0733fd6f-64d9-5794-ba37-97ae33233686&platform=android
05-18 13:06:40.936 13294 13294 V chromium: > Result: Success
05-18 13:06:40.936 13294 13294 V chromium: > HTTP Code: 200
05-18 13:06:40.936 13294 13294 V chromium: > Body: {"promotions":[{"id":"962abffd-4952-40cd-b90d-05868e233828","createdAt":"2023-04-12T09:53:03.111618Z","expiresAt":"2023-08-12T09:53:03.111618Z","version":5,"suggestionsPerGrant":120,"approximateValue":"30","type":"ugp","available":true,"platform":"android","publicKeys":["EuFcLm2oFoF1g6QGgozCcYkmslWy6eap+lXuD8XuGEw="],"legacyClaimed":false,"claimableUntil":"2023-07-12T09:53:03.111618Z"}]}
05-18 13:06:44.404 11780 15418 I ActivityManager: Killing 14340:com.brave.browser_nightly:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:6/u0a314i-8933 (adj 0): isolated not needed
05-18 13:06:44.601 13294 13294 V chromium: [VERBOSE1:rewards_service_impl.cc(437)] Ledger process is already running
05-18 13:06:44.614 13294 13294 V chromium: [VERBOSE5:ledger_impl.h(288)] 
05-18 13:06:44.614 13294 13294 V chromium: [ REQUEST ]
05-18 13:06:44.614 13294 13294 V chromium: > URL: https://grant.rewards.bravesoftware.com/v4/wallets/0733fd6f-64d9-5794-ba37-97ae33233686
05-18 13:06:44.614 13294 13294 V chromium: > Method: PATCH
05-18 13:06:44.614 13294 13294 V chromium: > Content: {"geoCountry":"US"}
05-18 13:06:44.614 13294 13294 V chromium: > Content Type: application/json; charset=utf-8
05-18 13:06:44.614 13294 13294 V chromium: > Header digest: SHA-256=3qb2VxsOc3ttZ2t4p2mnCmhKFFOCcXpkoqc/iirXnIA=
05-18 13:06:44.614 13294 13294 V chromium: > Header signature: keyId="0733fd6f-64d9-5794-ba37-97ae33233686",algorithm="ed25519",headers="digest (request-target)",signature="VoPBy95Rq1TDC39QlzwvmiDEU8Z4fIqw4KNCtnpW4QDsM6bfMkKzZ0bFLPLQUCHGcRcm/KhYJKl8ypCE8MGRAA=="
05-18 13:06:44.614 13294 13294 V chromium: > Header accept: application/json
05-18 13:06:44.725 13294 13294 V chromium: [VERBOSE6:logging_util.cc(120)] 
05-18 13:06:44.725 13294 13294 V chromium: [ RESPONSE - OnResponse ]
05-18 13:06:44.725 13294 13294 V chromium: > Url: https://grant.rewards.bravesoftware.com/v4/wallets/0733fd6f-64d9-5794-ba37-97ae33233686
05-18 13:06:44.725 13294 13294 V chromium: > Result: Failure
05-18 13:06:44.725 13294 13294 V chromium: > HTTP Code: 429
05-18 13:06:44.725 13294 13294 V chromium: > Body: limit exceeded
05-18 13:06:44.725 13294 13294 V chromium: 
05-18 13:06:44.729 13294 13294 I chromium: [INFO:patch_wallets.cc(78)] Unexpected status code! (HTTP 429)
05-18 13:06:44.732 13294 13294 I chromium: [INFO:wallet_create.cc(108)] Failed to update Rewards wallet!
05-18 13:06:44.762 13294 13294 V chromium: [VERBOSE5:ledger_impl.h(288)] 
05-18 13:06:44.762 13294 13294 V chromium: [ REQUEST ]
05-18 13:06:44.762 13294 13294 V chromium: > URL: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=0733fd6f-64d9-5794-ba37-97ae33233686&platform=android
05-18 13:06:44.762 13294 13294 V chromium: > Method: GET
05-18 13:06:44.786 13294 13294 V chromium: [VERBOSE6:logging_util.cc(120)] 
05-18 13:06:44.786 13294 13294 V chromium: [ RESPONSE - OnRequest ]
05-18 13:06:44.786 13294 13294 V chromium: > Url: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=0733fd6f-64d9-5794-ba37-97ae33233686&platform=android
05-18 13:06:44.786 13294 13294 V chromium: > Result: Success
05-18 13:06:44.786 13294 13294 V chromium: > HTTP Code: 200
05-18 13:06:44.786 13294 13294 V chromium: > Body: {"promotions":[{"id":"962abffd-4952-40cd-b90d-05868e233828","createdAt":"2023-04-12T09:53:03.111618Z","expiresAt":"2023-08-12T09:53:03.111618Z","version":5,"suggestionsPerGrant":120,"approximateValue":"30","type":"ugp","available":true,"platform":"android","publicKeys":["EuFcLm2oFoF1g6QGgozCcYkmslWy6eap+lXuD8XuGEw="],"legacyClaimed":false,"claimableUntil":"2023-07-12T09:53:03.111618Z"}]}

Steps to reproduce

  1. Launch Brave > Set Rewards to Staging in Dev options
  2. On NTP tap Reward Panel > Start using Brave Rewards
  3. Go through the flow > Tap Close when done
  4. Turn off the toggle switch for Brave Rewards
  5. Close and reopen Rewards panel > Observe that you need to set it up again
  6. Try to go through the flow again > Observe the error

Actual result

Brave Rewards setup flow is shown again when the user has already gone through it. If a user is trying to set it up again, Something went wrong is shown. The issue is happening on Beta and Nightly build, but not in Prod.

Nightly/Beta

Screen.Recording.2023-05-18.at.14.07.03.mov

Prod

Screen.Recording.2023-05-18.at.14.17.35.mov

Expected result

If a user already went through the Rewards setup flow, it must not be shown again

Issue reproduces how often

Easily reproduced

Version/Channel Information:

  • Can you reproduce this issue with the current Play Store version? No
  • Can you reproduce this issue with the current Play Store Beta version? Yes
  • Can you reproduce this issue with the current Play Store Nightly version? Yes

Device details

  • Install type (ARM, x86): ARM
  • Device type (Phone, Tablet, Phablet): Pixel 7 [phone]
  • Android version: Android 14 [oriole-user 14 TQ2A.230505.002 release-keys]

Brave version

Brave build: 1.53.47
Chromium: 114.0.5735.26 (Official Build) canary (64-bit)
Revision: 7075cbb66f0542ac3e01ddfde6b813e7d61118a5-refs/branch-heads/5735@{#454}

Website problems only

  • 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?

Additional information

@hffvld hffvld added OS/Android Fixes related to Android browser functionality bug feature/rewards QA/Yes regression labels May 18, 2023
@deeppandya deeppandya self-assigned this May 18, 2023
@hffvld hffvld changed the title Unable to turn on "Brave Rewards" from pop-up panel [Rewards] Unable to turn on "Brave Rewards" from pop-up panel May 18, 2023
@Miyayes Miyayes added the priority/P2 A bad problem. We might uplift this to the next planned release. label May 19, 2023
@kjozwiak kjozwiak added this to the 1.52.x - Beta milestone May 19, 2023
@Miyayes Miyayes added priority/P1 A very extremely bad problem. We might push a hotfix for it. and removed priority/P2 A bad problem. We might uplift this to the next planned release. labels May 20, 2023
@deeppandya
Copy link
Contributor

i was not able to reproduce the issue on latest nightly, beta and manual build from latest change. @vlad-hoff also confirmed the issue on prod : 1.51.118, Beta : 1.52.102, Nightly : 1.53.60

@hffvld
Copy link
Contributor Author

hffvld commented May 23, 2023

As @deeppandya mentioned today I wasn't able to reproduce this issue on Prod 1.51.118, Beta 1.52.102, Nightly 1.53.47 and Nightly 1.53.60. Not sure why it was happening earlier.

timestamp_16-29-13_16-29-57.mp4

@kjozwiak
Copy link
Member

I couldn't reproduce the above either after attempting it several times using 1.53.x & 1.52.x. Once I finished going through the onboarding, enabling/disabling rewards never triggered the onboarding flow again as expected. Removing release/blocking and removing from the 1.52.x milestone.

Lets leave this opened for another ~week or two and if no one can reproduce/runs into the above, we can close it off.

@kjozwiak kjozwiak removed this from the 1.52.x - Release milestone May 24, 2023
@kjozwiak kjozwiak added priority/P4 Planned work. We expect to get to it "soon". and removed release/blocking regression priority/P1 A very extremely bad problem. We might push a hotfix for it. labels May 24, 2023
@deeppandya deeppandya removed their assignment Jun 26, 2023
@Miyayes Miyayes closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature/rewards OS/Android Fixes related to Android browser functionality priority/P4 Planned work. We expect to get to it "soon". QA/Yes
Projects
None yet
Development

No branches or pull requests

4 participants