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

[Desktop] Follow up of #9869 - Monthly Payment AC settings are not retained correctly in upgraded profile 1.11.x #10438

Closed
GeetaSarvadnya opened this issue Jun 24, 2020 · 10 comments · Fixed by brave/brave-core#6002

Comments

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jun 24, 2020

Description

Found while testing #9869
Monthly Payment AC settings are not retained correctly in upgraded profile 1.11.x

Steps to Reproduce

Scenarios 1:

  1. Clean profile 1.10.x
  2. Enable rewards
  3. Change AC settings values except for monthly payment (keep the monthly payment as it is)
  4. Upgrade profile to 1.11.x
  5. Looks for AC advanced settings value, Monthly Payment value is displayed as 0.0 BAT and dropdown values are empty
  6. Rest other values are displayed as expected

Scenarios 2:

  1. Clean profile 1.10.x
  2. Enable rewards
  3. Change AC settings monthly payment to 50 BAT or any other value
  4. Upgrade profile to 1.11.x
  5. Looks for AC advanced settings value, Monthly Payment value is empty in UI
  6. Click on dropdown shows only 50.0 BAT and other dropdown values are empty
  7. Rest other values are displayed as expected

Note: Min page time, visit and other settings are working as expected.

Actual result:

Monthly Payment AC settings are not retained correctly in upgraded profile 1.11.x
Scenario1:
image
image

Scenario 2:
image
image
image
image

Expected result:

AC Advanced settings should be retained correctly in upgraded profile 1.11.x

Reproduces how often:

Always

Brave version (brave://version info)

Brave 1.11.75 Chromium: 83.0.4103.116 (Official Build) dev (64-bit)
Revision 8f0c18b4dca9b6699eb629be0f51810c24fb6428-refs/branch-heads/4103@{#716}
OS Windows 10 OS Version 1903 (Build 18362.900)

Version/Channel Information:

  • Can you reproduce this issue with the current release? No
  • 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? NA
  • Does the issue resolve itself when disabling Brave Rewards? NA
  • Is the issue reproducible on the latest version of Chrome? NA

Miscellaneous Information:

cc: @brave/legacy_qa @NejcZdovc @rebron

@GeetaSarvadnya
Copy link
Author

GeetaSarvadnya commented Jun 24, 2020

Test plan 2 from brave/brave-core#5647 (Upgraded profile from 1.10.x to 1.11.x)
USD conversion values are displayed as 0.0 BAT after the upgrade, but if I reload the page the correct values are displayed
This issue is arising in a clean profile also, after claiming grants in BR panel displays the USD value as 0.0 BAT. The Reload page fixes the issue.

Various pages where USD conversion value is displayed as 0.0 BAT - Upgraded Profile
image
image
image
image
image

Clean profile - 1.11.x
image

@NejcZdovc USD conversion values are not consistent in 1.10.x and 1.11.x. Is this expected? Also, it's not consistent in clean and upgraded profile.

1.10.x - UGP USD conversion value is displayed as 7.41 USD
image
when upgrade to 1.11.x - UGP USD conversion value is displayed as 7.47 USD
image

Clean profile 1.11.x UGP USD conversion value is displayed as 7.49 USD
image

@GeetaSarvadnya GeetaSarvadnya changed the title [Desktop] Follow up of #9869 - AC Advanced settings are not retained correctly in upgraded profile 1.11.x [Desktop] Follow up of #9869 - Monthly Payment AC settings are not retained correctly in upgraded profile 1.11.x Jun 24, 2020
@zenparsing zenparsing self-assigned this Jun 29, 2020
@zenparsing
Copy link

zenparsing commented Jul 2, 2020

This repros in nightly (1.12) as well. The issue appears to be that "API parameters" are downloaded from the server and updated after the rewards page has finished loading data from the rewards service, and is not notified that the parameters (like "batRate", default AC amount, and AC choices) have been updated.

This issue should only appear when the user is migrated from 1.10 and the rewards page is open on restart. Potential fixes include:

  • Add a method to RewardsServiceObserver to allow the front-end to listen for changes to API parameters.
  • Modify LedgerImpl::GetRewardsParameters to detect an "empty parameters" condition and wait for the API parameter fetch to complete.

@LaurenWags
Copy link
Member

LaurenWags commented Jul 2, 2020

@zenparsing I noticed that if I do the following, I basically encounter scenario 1, but my Rewards page was not open on restart. Does this have the same problem or should it be logged under a new issue?

Steps:

  1. Install 1.10.97, Enable Rewards
  2. Disable Rewards, close brave://rewards page
  3. Rename profile to dev, launch w/ 1.11.x
  4. Confirm Rewards are still off on upgrade (NTP widget shows message to re-enable, as does panel from BAT logo)
  5. Enable Rewards (I did this from the BAT logo panel)
  6. Open brave://rewards page (clicked on Rewards Settings on panel)
    --> on brave://rewards Monthly Payment is 0.000 BAT and that's also the only option available in settings.

Screen Shot 2020-07-02 at 1 53 21 PM

Screen Shot 2020-07-02 at 1 53 29 PM

  1. Reload of page does not fix. Close/reopen of tab does not fix. However, close/relaunch of the browser + refresh of the opened page after relaunch does fix this.
Brave 1.11.85 Chromium: 83.0.4103.116 (Official Build) dev (64-bit)
Revision 8f0c18b4dca9b6699eb629be0f51810c24fb6428-refs/branch-heads/4103@{#716}
OS macOS Version 10.14.6 (Build 18G3020)

@zenparsing
Copy link

@LaurenWags Great catch. It looks like there's an additional issue with 1.11 (but not 1.12) where API parameters are not fetched when rewards is enabled. (I believe it's not an issue in 1.12 because the everything is restarted every time rewards is turned on, as opposed to just when the browser is started.)

I need to spend a bit more time looking into whether a single fix will solve both issues.

@LaurenWags
Copy link
Member

Thanks @zenparsing - happy to open a separate issue if needed just let me know!

@angellyna1088
Copy link

angellyna1088 commented Jul 3, 2020 via email

@btlechowski
Copy link

Reproduced on Ubuntu

Brave 1.11.89 Chromium: 83.0.4103.116 (Official Build) dev (64-bit)
Revision 8f0c18b4dca9b6699eb629be0f51810c24fb6428-refs/branch-heads/4103@{#716}
OS Ubuntu 18.04 LTS

@LaurenWags
Copy link
Member

Adding QA/Blocked label - during testing of PR on Nightly noticed that originally reported issues were not resolved. Shared information with @zenparsing for investigation.

@zenparsing
Copy link

zenparsing commented Jul 9, 2020

Investigation uncovered two additional issues related to #7024:

  • The Select component in brave-ui has a bug where the currently displayed value is not updated when the list of options is updated. I'll see if I can come up with a workaround to avoid a dependency update.
  • The rewards extension is attempting to load wallet data before the state has been transitioned to prefs, and as a result is setting walletCorrupted to true. Furthermore, when the "wallet initialized" event occurs, a result of LEDGER_OK is is not correctly handled (it should reset walletCorrupted to false).

@kjozwiak
Copy link
Member

kjozwiak commented Jul 14, 2020

Verification PASSED on macOS 10.15.5 x64 using the following build:

Brave | 1.11.96 Chromium: 84.0.4147.89 (Official Build) (64-bit)
-- | --
Revision | 19abfe7bcba9318a0b2a6bc6634a67fc834aa592-refs/branch-heads/4147@{#852}
OS | macOS Version 10.15.5 (Build 19F101)

Scenario #1 from #10438 (comment)

Before Refresh After Refresh
Screen Shot 2020-07-14 at 12 51 40 PM Screen Shot 2020-07-14 at 12 52 04 PM
Screen Shot 2020-07-14 at 12 51 50 PM Screen Shot 2020-07-14 at 12 52 20 PM
  • Verified the closing/re-opening brave://rewards several times didn't reproduce the original issue after a refresh
  • Verified that restarting Brave several times didn't didn't reproduce the original issue after a refresh
  • Verified that enabling/disabling a-c several times didn't reproduce the original issue after a refresh

Scenario #2 from #10438 (comment)

Before Refresh After Refresh
Screen Shot 2020-07-14 at 1 07 28 PM Screen Shot 2020-07-14 at 1 07 36 PM
Screen Shot 2020-07-14 at 1 07 19 PM Screen Shot 2020-07-14 at 1 07 36 PM
  • Verified the closing/re-opening brave://rewards several times didn't reproduce the original issue after a refresh
  • Verified that restarting Brave several times didn't didn't reproduce the original issue after a refresh
  • Verified that enabling/disabling a-c several times didn't reproduce the original issue after a refresh

Scenario #3 from #10438 (comment)

  • Verified that after enabling Rewards once Brave has been updated, Monthly Payment under brave://settings doesn't appear as 0.000 BAT
  • Verified that after enabling Rewards once Brave has been updated, Monthly Payment under a-c settings doesn't appear as 0.000 BAT

Went through the above cases with both the selected default which is 20.000 BAT and selected 50.000 BAT from the dropdown. Both cases passed without issues.


Verification passed on


Brave | 1.11.97 Chromium: 84.0.4147.89 (Official Build) (64-bit)
-- | --
Revision | 19abfe7bcba9318a0b2a6bc6634a67fc834aa592-refs/branch-heads/4147@{#852}
OS | Windows 10 OS Version 1903 (Build 18362.959)


Scenario #1 from #10438 (comment)

Before refresh:
image
image

After refresh:
image
image

  • Verified the closing/re-opening brave://rewards several times didn't reproduce the original issue after a refresh
  • Verified that restarting Brave several times didn't reproduce the original issue after a refresh
  • Verified that enabling/disabling a-c several times didn't reproduce the original issue after a refresh

Scenario #2 from #10438 (comment)
Before refresh:
image
image

After refresh:
image
image

  • Verified the closing/re-opening brave://rewards several times didn't reproduce the original issue after a refresh
  • Verified that restarting Brave several times didn't reproduce the original issue after a refresh
  • Verified that enabling/disabling a-c several times didn't reproduce the original issue after a refresh

Scenario #3 from #10438 (comment)

  • Verified that after enabling Rewards once Brave has been updated, Monthly Payment under brave://settings doesn't appear as 0.000 BAT
  • Verified that after enabling Rewards once Brave has been updated, Monthly Payment under a-c settings doesn't appear as 0.000 BAT

Went through the above cases with both the selected default which is 20.000 BAT and selected 50.000 BAT from the dropdown. Both cases passed without issues.

Verification passed on

Brave 1.11.97 Chromium: 84.0.4147.89 (Official Build) (64-bit)
Revision 19abfe7bcba9318a0b2a6bc6634a67fc834aa592-refs/branch-heads/4147@{#852}
OS Ubuntu 18.04 LTS

Verified test plan from #10438 (comment)

Scenario #1
Before refresh
image
image

After refresh
image
image

Scenario #2
Before refresh
image
image

After refresh
image
image

Scenario #3

  • Verified that after enabling Rewards once Brave has been updated, Monthly Payment under brave://settings doesn't appear as 0.000 BAT
  • Verified that after enabling Rewards once Brave has been updated, Monthly Payment under a-c settings doesn't appear as 0.000 BAT

Went through the above cases with both the selected default which is 20.000 BAT and selected 50.000 BAT from the dropdown. Both cases passed without issues.

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