brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.65k stars 2.3k forks source link

Monthly contributions are not going through in 1.51 #29859

Closed GeetaSarvadnya closed 1 year ago

GeetaSarvadnya commented 1 year ago

Description

Found while testing https://github.com/brave/brave-browser/issues/28173 Monthly contributions are not going through in 1.51

Steps to reproduce

  1. Clean profile 1.51.x enabled Rewards and connect to an an external wallet
  2. Set monthly tip to a verified publishers
  3. Wait for the monthly tip to process
  4. The monthly contributions are not going through

Actual result

The monthly contributions are not going through

Expected result

The monthly contributions should go through

Issue reproduces how often

Easy

Version/Channel Information:

Device details

Brave version

1.51.80

Website problems only

Additional information

CC: @brave/qa-team @Miyayes @zenparsing

slack thread about the issue discussion https://bravesoftware.slack.com/archives/CNH9Q6REV/p1681746838676479

Miyayes commented 1 year ago

How to test this:

(Side note: Geeta says that even though the A-C is failing, for some reason, the A-C amount is showing up in the UI...)

@zenparsing @GeetaSarvadnya

LaurenWags commented 1 year ago

tried several times using 1.51.105 and AC and monthly tips went through successfully on my Google Pixel 3XL. will sync with @GeetaSarvadnya to see if we can determine where our steps differ.

I have some example logs I can share if needed.

kjozwiak commented 1 year ago

@LaurenWags @GeetaSarvadnya lets try to narrow this one down. If it's a real issue, we'll want to get this fixed in 1.51.x. Sounds like it's not occurring in 1.50.x as per the notes in the original issue so we'll be regressing users.

GeetaSarvadnya commented 1 year ago

@LaurenWags Thanks for checking!

I have tried AC and monthly contribution together on 1.51.105, only AC is going through. Also I have tried Monthly contribution alone (AC is turned OFF) monthly tips are NOT processing alone also. It looks strange I am not sure why monthly tips are NOT working for me.

GeetaSarvadnya commented 1 year ago

The issue is Reproducible on both Desktop and Android. Steps which I followed on Desktop and Android are listed below.

Desktop

  1. Clean profile 1.51.105
  2. Launch browser using cmd line flag brave.exe --enable-logging=stderr --vmodule="*/bat-native-ledger/*"=9,"*/brave_rewards/*"=9,"*/bat-native-ads/*"=9,"*/bat-native-confirmations/*"=9,"*/brave_ads/*"=9,"*/brave_user_model/*"=9 --rewards=staging=true,rewards=debug=true
  3. Enable rewards and connect to a custodian
  4. Setup AC and monthly tips
  5. Next Contribution date is disaplyed as 27th May in AC and monthly tips panel
  6. Close the browser
  7. Set the sys date to 27th May
  8. Relaunched the browser
  9. AC is processed
  10. Monthly tips are not processed

Android

  1. Clean profile 1.51.105
  2. Enable rewards staging flags via QA preferences
  3. Enable rewards, select the country from the dropdown (I have selected UK as my uphold act is created for this region)
  4. Connect to a uphold wallet
  5. Open laurenwags.github.io
  6. Setup default monthly tip of 1.25 BAT
  7. The site laurenwags.github.io was added into AC table
  8. The Next contribution date is dispalyed as 27 May in AC and Monthly tips panel
  9. Removed app from memory
  10. Set the system date as 27 May
  11. Relaunch the browser
  12. In a min or so, site got removed from the AC table and AC went through
  13. Waited for more than 30 mins, monthly tip did not process

However, monthly tips are processed on both Desktop and Android if we use the cmd line flag brave.exe --enable-logging=stderr --vmodule="*/bat-native-ledger/*"=9,"*/brave_rewards/*"=9,"*/bat-native-ads/*"=9,"*/bat-native-confirmations/*"=9,"*/brave_ads/*"=9,"*/brave_user_model/*"=9 --rewards=staging=true,rewards=debug=true,reconcile-interval=5

LaurenWags commented 1 year ago

Reproduced on both desktop and android using @GeetaSarvadnya steps above and 1.51.106.

Not sure if it's helpful, but when I was trying to reproduce the monthly tips issue without any sites in my AC list (empty list, not AC disabled), I saw this in my logs (I took out superfluous info re: prefix list download, etc)

[27106:259:0527/093538.496519:VERBOSE1:contribution.cc(275)] Auto-contribute timer set for 2.592e+06 s
[27106:259:0527/093538.497075:VERBOSE1:contribution.cc(241)] Starting auto-contribute
[27106:259:0527/093538.498514:VERBOSE1:contribution_ac.cc(31)] Starting auto contribution
[27106:259:0527/093538.499832:VERBOSE1:contribution.cc(308)] Monthly contribution timer set for -3e-06 s
[27106:259:0527/093538.500754:VERBOSE1:publisher.cc(447)] Publisher list is empty
[27106:259:0527/093538.500868:VERBOSE1:contribution_ac.cc(51)] AC list is empty
[27106:259:0527/093538.502397:VERBOSE1:contribution.cc(216)] Starting monthly contributions
[27106:259:0527/093539.069106:VERBOSE1:contribution.cc(135)] Queue timer set for 2 s
[27106:259:0527/093539.298212:VERBOSE1:contribution.cc(308)] Monthly contribution timer set for 2.592e+06 s

Note, when I was initially trying via https://github.com/brave/brave-browser/issues/29859#issuecomment-1523988179, I had been using a similar command line to the one mentioned by @GeetaSarvadnya but the one I was using had reconcile-interval=10 as part of the --rewards= section. Seems like when we use command line to set this value then everything processes as expected, but without reconcile-interval=somevalue, then monthly tips do not process.

kjozwiak commented 1 year ago

The above requires 1.51.109 or higher for 1.51.x verification 👍

GeetaSarvadnya commented 1 year ago

Verification PASSED on

Brave | 1.51.109 Chromium: 113.0.5672.63 (Official Build) (64-bit)
-- | --
Revision | 0e1a4471d5ae5bf128b1bd8f4d627c8cbd55f70c-refs/branch-heads/5672@{#912}
OS | Windows 10 Version 21H2 (Build 19044.2846)
Clean profile - PASSED Per https://github.com/brave/brave-core/pull/18282#issue-1687240171, confirming that issue does not reproduce on a clean profile with RC 1.51.109 1. Clean profile `1.51.109` 2. Launch browser using cmd line flag `--args --enable-logging=stderr --vmodule="*/variations/*"=9,"*/bat-native-ledger/*"=9,"*/brave_rewards/*"=9,"*/bat-native-ads/*"=9,"*/bat-native-confirmations/*"=9,"*/brave_ads/*"=9,"*/brave_user_model/*"=9,"*/bat_ads/*"=9 --rewards=staging=true,debug=true` 3. Enable rewards and connect to a custodian 4. Setup AC and monthly tips 5. `Next Contribution date` is displayed as `31st May` in AC and monthly tips panel 6. Close the browser 7. Set the sys date to `31st May` 8. Relaunched the browser 9. AC is processed 10. Confirmed monthly tips are processed Step 4 | Step 4 | Step 9/10 | Step 9/10 | Step 9/10 | Step 9/10 | Step 9/10 | Step 9/10 --- | --- | --- | --- | --- | --- | --- | --- ![image](https://user-images.githubusercontent.com/38657976/235435587-36ab9fd4-a21a-4494-83da-2049ded5b269.png) | ![image](https://user-images.githubusercontent.com/38657976/235435622-9143dd01-2405-4312-a271-47555d1c6f65.png) | ![image](https://user-images.githubusercontent.com/38657976/235436717-d4cb43f1-c64a-47a5-a6bb-8f215a67c8b7.png) | ![image](https://user-images.githubusercontent.com/38657976/235436833-4a32da65-1486-42c4-b027-9e9f6ab66a83.png) | ![image](https://user-images.githubusercontent.com/38657976/235436856-2a31dea4-403f-4c72-91a2-14c3e7de2569.png) | ![image](https://user-images.githubusercontent.com/38657976/235436904-d0cc6172-de9a-48ed-a0ae-0cc9366290b8.png) | ![image](https://user-images.githubusercontent.com/38657976/235436934-686f5820-3ba4-47af-9328-ee569a59a590.png) | ![image](https://user-images.githubusercontent.com/38657976/235436963-4448044b-5b07-4bfd-bfbe-7e0e1e98a3c2.png)
Upgrade profile - PASSED Per https://github.com/brave/brave-core/pull/18282#issue-1687240171, set up issue using 1.51.107 (RC), then updated to version with the fix to confirm issue is resolved. 1. Clean profile `1.51.107` 2. Launch browser using cmd line flag `--args --enable-logging=stderr --vmodule="*/variations/*"=9,"*/bat-native-ledger/*"=9,"*/brave_rewards/*"=9,"*/bat-native-ads/*"=9,"*/bat-native-confirmations/*"=9,"*/brave_ads/*"=9,"*/brave_user_model/*"=9,"*/bat_ads/*"=9 --rewards=staging=true,debug=true` 3. Enable rewards and connect to a custodian 4. Setup AC and monthly tips (note, in 1.51.x setting a monthly tip does not send one right away it only schedules one for the future) 5. `Next Contribution date` is displayed as `31st May` in AC and monthly tips panel 6. Upgrade the profile to `1.51.109` and close the browser 7. Set the sys date to `31st May` 8. Relaunch the browser 9. AC is processed 10. Confirmed monthly tips are processed Step 4 | Step 4 | Step 9/10 | Step 9/10 | Step 9/10 | Step 9/10 | Step 9/10 --- | --- | --- | --- | --- | --- | --- ![image](https://user-images.githubusercontent.com/38657976/235438350-09e2565d-a1ad-4bc8-b029-7bb8e063ec8f.png) | ![image](https://user-images.githubusercontent.com/38657976/235438384-5a8faf1b-ccab-429b-b205-e96a7cdd6888.png) | ![image](https://user-images.githubusercontent.com/38657976/235440600-cf4443f4-0d6e-4a78-98da-745db1cbaa5f.png) | ![image](https://user-images.githubusercontent.com/38657976/235440673-8851c38a-42bc-4010-b5fb-cb3d6489e30d.png) | ![image](https://user-images.githubusercontent.com/38657976/235440742-8826a7cd-daf6-4e58-a619-daa95723d6b0.png) | ![image](https://user-images.githubusercontent.com/38657976/235440789-fc447437-c111-4330-9eca-05fa8ee9f4f9.png) | ![image](https://user-images.githubusercontent.com/38657976/235440814-3298dc4e-de91-4501-8a2e-db1140d6f065.png)
GeetaSarvadnya commented 1 year ago

Verification PASSED on Vivo X70 Pro version 12 running Bravemonoarm64.apk_1.51.109

Clean profile - PASSED Per https://github.com/brave/brave-core/pull/18282#issue-1687240171, confirming that issue does not reproduce on a clean profile with RC/1.51.109. 1. Clean profile 1.51.109 2. Enable rewards staging flags via QA preferences 3. Enable rewards, select the country from the dropdown (I have selected UK as my uphold act is created for this region) Connect to a uphold wallet 4. Setup AC and monthly tips (note, in Nightly setting a monthly tip sends one right away as well as schedules one for the future) 5. `Next Contribution date` is displayed as `31st May` in AC and monthly tips panel 6. Close the browser 7. Set the sys date to `31st May` 8. Relaunched the browser 9. AC is processed 10. Confirmed monthly tips are processed Step 4 | Step 4 | Step 9/10 | Step 9/10 | Step 9/10 | Step 9/10 | Step 9/10 --- | --- | --- | --- | --- | --- | --- ![Screenshot_20230501_222427](https://user-images.githubusercontent.com/38657976/235494711-e00f0ac7-d54a-40fb-b072-6bc232d4c468.jpg) | ![Screenshot_20230501_222433](https://user-images.githubusercontent.com/38657976/235494724-e9f1d12a-317d-4a96-80df-981aaf1ab56c.jpg) | ![Screenshot_20230531_223508](https://user-images.githubusercontent.com/38657976/235494740-4a342ff7-16c2-45fa-a83c-432996ca278d.jpg) | ![Screenshot_20230531_223613](https://user-images.githubusercontent.com/38657976/235494757-6fe8939c-e517-43c6-b114-05599a015d50.jpg) | ![Screenshot_20230531_223824](https://user-images.githubusercontent.com/38657976/235494772-06f17bbb-de70-4592-9170-c5c526333e13.jpg) | ![Screenshot_20230531_224005](https://user-images.githubusercontent.com/38657976/235494795-18eee468-ccb6-4153-a556-5ac42310d09d.jpg) | ![Screenshot_20230531_224010](https://user-images.githubusercontent.com/38657976/235494814-2274e0f6-1a9b-4197-a64d-d1fb3df0dc6e.jpg)
Upgrade profile - PASSED Per https://github.com/brave/brave-core/pull/18282#issue-1687240171, set up issue using 1.51.107 RC, then updated to version with the fix to confirm issue is resolved. (**Note**: In Android we don't have option to rename the profile from RC to nightly, hence I have installed 1.52.x nightly build where I was able to reproduce the issue 29859, and then updated/installed 1.53.4 on top of it where the fix is available) 1. Clean profile `1.51.107` RC build 2. Enable rewards staging flags via QA preferences 3. Enable rewards and connect to a custodian 4. Setup AC and monthly tips (note, in 1.51.107 setting a monthly tip does not send one right away it only schedules one for the future) 5. `Next Contribution date` is displayed as `31st May` in AC and monthly tips panel 6. Update the profile to `1.51.109` with the fix 7. Close the browser 8. Set the sys date to `31st May` and relaunch the browser 9. AC is processed 10. Confirmed monthly tips are processed Step 4 | Step 4 | Step 9/10 | Step 9/10 | Step 9/10 | Step 9/10 --- | --- | --- | --- | --- | --- ![Screenshot_20230501_225334](https://user-images.githubusercontent.com/38657976/235500013-e3bba4c1-e168-439f-8064-857c8bd569b7.jpg) | ![Screenshot_20230501_225341](https://user-images.githubusercontent.com/38657976/235500043-1abcadc1-7697-4174-880a-d0f01c5dba1f.jpg) | ![Screenshot_20230531_231820](https://user-images.githubusercontent.com/38657976/235500529-7a01e7aa-fe56-4a5e-a25d-76baf8d223b0.jpg) | ![Screenshot_20230531_231833](https://user-images.githubusercontent.com/38657976/235500561-fae354bc-8e69-4180-b6b6-6fd71a2c2311.jpg) | ![Screenshot_20230531_231838](https://user-images.githubusercontent.com/38657976/235500587-91da4b6f-d24a-4bb8-a59c-b77b5465db41.jpg) | ![Screenshot_20230531_231925](https://user-images.githubusercontent.com/38657976/235500614-4bc118d2-aada-44fb-b1a1-b8a78e036102.jpg)