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

Corrupted auto-contribute table #3134

Closed
btlechowski opened this issue Jan 28, 2019 · 9 comments · Fixed by brave/brave-core#1491
Closed

Corrupted auto-contribute table #3134

btlechowski opened this issue Jan 28, 2019 · 9 comments · Fixed by brave/brave-core#1491

Comments

@btlechowski
Copy link

btlechowski commented Jan 28, 2019

Sometimes a-c table gets corrupted.

Steps to Reproduce

  1. Clean profile
  2. Enable rewards
  3. Change Minimum page time before logging a visit to 5 in a-c table settings
  4. Open https://kjozwiak.github.io/ and wait 7 seconds
  5. Restart the browser
  6. Open https://kjozwiak.github.io/ and wait 7 seconds
  7. check publisher_info_db

Actual result:

auto-contribute table becomes corrupted
Not able to add sites to ledger
score for https://kjozwiak.github.io/ in publisher_info_db is negative

image

3134

publisher_info_db.zip

Expected result:

ac table is not curropted

Reproduces how often:

100% reproduction rate

Brave version (brave://version info)

Brave 0.59.30 Chromium: 72.0.3626.71 (Official Build) (64-bit)
Revision f52ccad2a6a3c65fc9e0c591a517ceab1198dac0-refs/branch-heads/3626@{#763}
OS Windows 7

cc @brave/legacy_qa @NejcZdovc

@NejcZdovc
Copy link
Contributor

let's re-test this one after brave/brave-core#1457 and brave/brave-core#1399 lands

@kjozwiak kjozwiak added this to the 1.x Backlog milestone Jan 28, 2019
@kjozwiak
Copy link
Member

@NejcZdovc this seems pretty bad. Both @btlechowski and @GeetaSarvadnya reproduced this issue after upgrading. When it happens, they both mentioned that new websites are not being added into the a-c table and the % are not being recalculated when revisiting publishers that are already in the table.

@LaurenWags attempting to reproduce on macOS right now. I'm going to try reproducing on Win to see if this is a Win related issue or a general problem.

@LaurenWags
Copy link
Member

Reproduced a corrupted a-c table with these steps (thanks @GeetaSarvadnya !):

  1. installed 0.58.21
  2. Enable rewards and restore wallet which has balance
  3. Change Auto-Contribute Settings default settings for page time and visit( I have set 5seconds and 1 visit)
  4. Add few sites - added 6 sites ( Verified + non verified sites)
  5. Tip a site and close the browser
  6. Install 0.59.31
  7. Visit the same sites in the a-c table - I visited the site I tipped --> attention % rate is not increased
  8. Attempt to add a new site to a-c table --> site not added to a-c table

When I look at publisher_info_db the site I visited in steps 7 and 8 have negative score values:
screen shot 2019-01-28 at 2 54 31 pm

@LaurenWags
Copy link
Member

LaurenWags commented Jan 28, 2019

Reproduced a corrupted a-c table when updating from 0.58.18 --> 0.58.21 as well. These were my steps:

  1. installed 0.58.18
  2. Enable rewards and restore wallet which has balance
  3. Change Auto-Contribute Settings default settings for page time and visit( I have set 5seconds and 1 visit)
  4. Add few sites - added 6 sites ( Verified + non verified sites)
  5. Tip a site. This is my a-c table:
    screen shot 2019-01-28 at 3 03 31 pm
  6. Navigate to brave://settings/help to trigger update check. Relaunch after update is downloaded.
  7. Visit the same sites in the a-c table --> attention % rate is not increased
  8. Attempt to add a new site to a-c table --> first site visited is added to a-c table with 0%, second site visited is not added to a-c table at all.
    This is my a-c table:
    screen shot 2019-01-28 at 3 09 20 pm

When I look at publisher_info_db the site I visited in steps 7 and 8 have negative score values:
screen shot 2019-01-28 at 3 08 41 pm

@NejcZdovc NejcZdovc self-assigned this Jan 28, 2019
@LaurenWags
Copy link
Member

LaurenWags commented Jan 28, 2019

Quicker repro steps:

  1. Install Brave (I was using 0.58.21), enable rewards
  2. Change Auto-Contribute Settings default settings for page time (change from 8s to 5s)
  3. Add a few sites (I used clifton.io, ddg, google)
  4. Close and relaunch Brave
  5. Visit a site already in a-c table --> attention % does not change
  6. Visit a new site (it was added with 0%)
    screen shot 2019-01-28 at 3 44 14 pm
Brave 0.58.21 Chromium: 71.0.3578.98 (Official Build) (64-bit)
Revision 15234034d19b85dcd9a03b164ae89d04145d8368-refs/branch-heads/3578@{#897}
OS Mac OS X

@btlechowski
Copy link
Author

I updated the main issue with reliable STR. Thanks @GeetaSarvadnya and @LaurenWags !

@kjozwiak kjozwiak modified the milestones: 1.x Backlog, 0.59.x - Release Jan 28, 2019
@kjozwiak
Copy link
Member

kjozwiak commented Jan 28, 2019

Thanks @LaurenWags @btlechowski @GeetaSarvadnya 👍

Labelled this as a blocker as it will put users in a bad state whenever they update any of the a-c settings. Once you get into the above state, new publishers won't be added into the a-c table and old publishers that are already in the a-c table won't be updated correctly.

I'm not 100% sure how many users actually play around with the a-c settings but whoever does will most likely get into the above state. We should probably fix this as we don't need anymore users in bad states.

@NejcZdovc when you take a look at this one, can you also check if there's a way to fix users who might be in this broken state?

@Sh1d0w
Copy link

Sh1d0w commented Jan 30, 2019

FYI This bug is present in the official release 0.58.21. I've been observing it for at least two weeks without being able to contribute to a verified websites, which still shows as unverified.

I thought it was related to #2816 (comment) so I've reported it there.

@LaurenWags
Copy link
Member

LaurenWags commented Jan 30, 2019

Verified passed with

Brave 0.59.33 Chromium: 72.0.3626.81 (Official Build) (64-bit)
Revision ac8b982e05014492d1bd7d317628a4f22a97ffa0-refs/branch-heads/3626@{#796}
OS Mac OS X
  • Verified STR on clean profile does not cause issue
  • Verified when a profile (from 0.58.21) with issue as described is updated to 0.59.33, and a new site is visited, has the table correctly displayed (no sites lost, % values are accurate, weights in publisher_info_db are accurate)
  • Verified when a profile (from 0.58.21) without the issue as described is updated to 0.59.33 and a new site is visited has the table correctly displayed (no sites lost, % values are accurate, weights in publisher_info_db are accurate)

Verification passed on

Brave 0.59.33 Chromium: 72.0.3626.81 (Official Build) (64-bit)
Revision ac8b982e05014492d1bd7d317628a4f22a97ffa0-refs/branch-heads/3626@{#796}
OS Windows 7

Used STR from OP.
Checked update from 0.58.21 with and without corrupted profile

Verification passed on

Brave 0.59.33 Chromium: 72.0.3626.81 (Official Build) (64-bit)
Revision ac8b982e05014492d1bd7d317628a4f22a97ffa0-refs/branch-heads/3626@{#796}
OS Linux

Used STR from OP.
Checked update from 0.58.21 with and without corrupted profile

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