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

claimed_at db timestamp value resets to zero after sending one time or recurring tip #8180

Closed
GeetaSarvadnya opened this issue Feb 11, 2020 · 5 comments · Fixed by brave/brave-core#4602

Comments

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Feb 11, 2020

Description

Found while testing #7297

claimed_at db timestamp value resets to zero after sending one time or recurring tip

Steps to Reproduce

  1. Clean profile 1.4.x launch brave using brave.exe --rewards=staging=true
  2. Enable rewards
  3. Open publisher_info_db and check promotion shows claimed_at value as 0 (expected)
  4. Claim UGP grants in browser
  5. Repeat step 3 and make sure claimed_at value shows UGP grants claimed timestamp
  6. Send a one-time tip or recurring tip to a verified pub
  7. Repeat step 3, claimed_at value resets to 0

Actual result:

Before claiming UGP grants: Just enable rewards
image
After claiming UGP grants:
image
After setting one-time or recurring tip
image

Expected result:

claimed_at db timestamp value should not reset to zero after sending a one-time tip or recurring tip

Reproduces how often:

Always

Brave version (brave://version info)

Brave 1.4.84 Chromium: 80.0.3987.87 (Official Build) beta (64-bit)
Revision 449cb163497b70dbf98d389f54e38e85d4c59b43-refs/branch-heads/3987@{#801}
OS Windows 10 OS Version 1803 (Build 17134.1006)

Version/Channel Information:

  • Can you reproduce this issue with the current release? NA
  • 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 @bsclifton

@btlechowski
Copy link

Unable to reproduce on Ubuntu.

Brave 1.4.86 Chromium: 80.0.3987.87 (Official Build) beta (64-bit)
Revision 449cb163497b70dbf98d389f54e38e85d4c59b43-refs/branch-heads/3987@{#801}
OS Ubuntu 18.04 LTS

After tipping the claimed_atis not set to 0 after tipping or setting monthly tip.

@GeetaSarvadnya make sure you close Brave when checking publisher_info_db. And close your DB program when running Brave. The DB program may keep file open and prevent the change to it.

@NejcZdovc NejcZdovc added this to the 1.3.x - Release Hotfix 2 milestone Feb 14, 2020
@NejcZdovc NejcZdovc self-assigned this Feb 14, 2020
@GeetaSarvadnya
Copy link
Author

GeetaSarvadnya commented Feb 15, 2020

@btlechowski I did close brave and DB after every transaction to see the data in DB.

@kjozwiak
Copy link
Member

Should be able to QA this once we get 1.3.116 which as been started 👍

@GeetaSarvadnya
Copy link
Author

The issue is reported in 1.4.x. The PR brave/brave-core#4202 is not merged in 13.116 hence moving the issue out of 1.3.x hotfix.

@GeetaSarvadnya
Copy link
Author

GeetaSarvadnya commented Feb 20, 2020

Verification passed on

Brave 1.4.93 Chromium: 80.0.3987.116 (Official Build) (64-bit)
Revision dc00a510e4c2ae25c4d084cc3d946fc782249224-refs/branch-heads/3987@{#917}
OS Windows 10 OS Version 1803 (Build 17134.1006)
  • Verified the STR from the description

Before claiming UGP grants:
image

After claiming UGP grants:
image

After setting a one-time or recurring tip
image

  • Verified the test plan from Unblind token fix brave-core#4602
  • Once the appropriate changes were made as per the STR, ensured that the following request was made once the browser was restarted:
[ REQUEST ]
> url: https://grant.rewards.bravesoftware.com/v1/promotions/reportclobberedclaims
> method: UrlMethod::POST
> content: {"claimIds":["c20c16bf-5ce9-4f7f-946a-28e15fa5c1e7"]}
> contentType: application/json; charset=utf-8
[ END REQUEST ]

Also ensured that both the promotion and promotion_creds tables were empty in publisher_info_db once the browser was restarted.


Verification passed on

Brave 1.4.93 Chromium: 80.0.3987.116 (Official Build) (64-bit)
Revision dc00a510e4c2ae25c4d084cc3d946fc782249224-refs/branch-heads/3987@{#917}
OS Linux
  • Verified the STR from the description

Before claiming UGP grants:
image

After claiming UGP grants:
image

After setting a one-time or recurring tip
image


Verification PASSED on macOS 10.15.3 x64 using the following build:

Brave 1.4.93 Chromium: 80.0.3987.116 (Official Build) (64-bit)
Revision dc00a510e4c2ae25c4d084cc3d946fc782249224-refs/branch-heads/3987@{#917}
OS macOS Version 10.15.3 (Build 19D76)

Before claiming UGP & Ad grants:

Screen Shot 2020-02-20 at 7 19 07 PM

After claiming UGP & Ad grants:

Screen Shot 2020-02-20 at 7 19 44 PM

After tipping 10 BAT:

Screen Shot 2020-02-20 at 7 20 13 PM

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