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

Values in brave://rewards are using defaults, not values from publisher_state #2265

Closed
bsclifton opened this issue Nov 28, 2018 · 2 comments · Fixed by brave/brave-core#992
Closed

Comments

@bsclifton
Copy link
Member

bsclifton commented Nov 28, 2018

Description

Likely the same root cause as #2260

If I do an import for Brave Payments (discovered by @LaurenWags with brave/brave-core#736), values like minimum visit time, # visits, allow unverified contributions, etc are imported and put into the publisher_state file

When you visit brave://rewards, it shows the default values that are coming from here:
https://github.com/brave/brave-core/blob/a07948dd2cb553cb7650d879b81f05f6f5bdcb35/components/brave_rewards/resources/ui/storage.ts#L10-L49

Each web_ui page is keeping its store in local storage... but in this case, the code is never initialized with the values from the RewardsService (in C++)

Test plan / Steps to Reproduce

  1. Fresh profile
  2. Visit brave://rewards and enable rewards
  3. Quit Brave
  4. Open the Default/publisher_state file in your session directory, using your favorite editor
  5. Edit the JSON and change min_pubslisher_duration to 60
  6. Re-launch Brave
  7. Open Auto-Contribute settings (the gear icon)

Actual result:

UI shows 8 seconds, not 1 minute

Expected result:

UI should respect value from Default/publisher_state (60 seconds / 1 minute)

Reproduces how often:

100%

Brave version (brave://version info)

master brave/brave-core@a07948d

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds?
    Yes

Additional Information

I started to do a fix last nite and verified that this does indeed set the values:
brave/brave-core@16e2ee6

However, it doesn't seem to set all of the values properly. I might have a misspelling for the preference names

@tmancey
Copy link
Contributor

tmancey commented Nov 30, 2018

brave/brave-core#992

@LaurenWags
Copy link
Member

LaurenWags commented Dec 3, 2018

Verified passed with

Brave 0.57.12 Chromium: 71.0.3578.75 (Official Build) (64-bit)
Revision 06ef00b5279f93f8e0c1e73acedd49d7dcc09767-refs/branch-heads/3578@{#836}
OS Mac OS X
  • Verified STR in description
  • Verified the following settings were imported from muon appropriately: Minimum page time before logging a visit, Minimum visits for publisher relevancy, Allow contribution to non-verified sites, Allow contribution to videos

Verified passed with

Brave 0.57.12 Chromium: 71.0.3578.75 (Official Build) (64-bit)
Revision 06ef00b5279f93f8e0c1e73acedd49d7dcc09767-refs/branch-heads/3578@{#836}
OS Windows 7 x64
  • Verified STR in description

Verification passed on

Brave 0.57.17 Chromium: 71.0.3578.80 (Official Build) (64-bit)
Revision 2ac50e7249fbd55e6f517a28131605c9fb9fe897-refs/branch-heads/3578@{#860}
OS Linux
  • Verified steps from description

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