-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Do not overwrite or generate new Wallet Payment ID when wallet info cannot be decrypted #16373
Comments
Verified
|
Brave | 1.29.46 Chromium: 92.0.4515.115 (Official Build) nightly (x86_64) |
---|---|
Revision | 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4} |
OS | macOS Version 11.5.1 (Build 20G80) |
Scenario: App loses access to system password store
Steps:
- Opened the browser with a clean profile on staging.
- Opened the
brave://rewards
panel and clicked "Start using Brave Rewards" to generate a rewards wallet. - Accepted the 30.000 BAT UGP grant.
- Closed the browser.
- Opened the
Keychain Access
app and removedBrave Browser Nightly.app
from theBrave Safe Storage
list. - Started the browser and denied the app's request to access the system password store.
- Navigated to
brave://rewards
. - Toggled
Ads
tooff
. - Navigated to
brave://rewards-internals
and viewed the logs. - Verified a "Decryption failed" message was logged.
- Restarted the browser, and granted access to the system password store.
- Confirmed that Rewards tipping and auto-contributions were working.
example | example | example | example | example | example | example | example | example |
---|---|---|---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Scenario: Rewards wallet data is corrupted
Steps:
- Opened the browser with a clean profile on staging.
- Opened the
brave://rewards
panel and clicked "Start using Brave Rewards" to generate a rewards wallet. - Accepted the 30.000 BAT UGP grant.
- Closed the browser.
- Added junk characters to the value in
brave.rewards.wallets.brave
- Launched Brave
- Opened
brave://rewards-internals
- Confirmed I saw the following in the logfile:
[Aug 17, 2021, 12:27:22.0 PM:ERROR:state.cc(387)] Base64 decoding failed for wallets.brave
[Aug 17, 2021, 12:27:22.0 PM:ERROR:ledger_impl.cc(579)] Wallet is null
- Confirmed I could tip and auto-contribute works too.
example | example | example | example |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Verification passed on
Brave | 1.29.60 Chromium: 92.0.4515.131 (Official Build) beta (64-bit) |
---|---|
Revision | 6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29-refs/branch-heads/4515@{#1933} |
OS | Ubuntu 18.04 LTS |
Verified test plan from brave/brave-core#9504
Verification PASSED on Win 10 x64
using the following build:
Brave | 1.29.75 Chromium: 93.0.4577.58 (Official Build) (64-bit)
-- | --
Revision | c4410ece044414ea42fa4ba328d08195e818a99c-refs/branch-heads/4577@{#1076}
OS | Windows 10 OS Version 2009 (Build 19042.1165)
- Started Brave on
staging
and enabled rewards via the rewards panel - once rewards was enabled, claimed the grant for 30 BAT
- closed brave and corrupted
brave.rewards.wallets.brave
via thePreference
file
Once the above was completed, launched Brave and ensured that the following appeared within the logs/terminal:
[94300:64832:0830/134227.983:INFO:state.cc(387)] Base64 decoding failed for wallets.brave
[94300:64832:0830/134227.983:INFO:ledger_impl.cc(579)] Wallet is null
Ensured that both tipping & AC is working after receiving the Wallet is null
error in the terminal/reward logs:
Tipping Example Tipping |
Tipping Example |
---|---|
![]() |
![]() |
AC Example |
AC Example |
---|---|
![]() |
![]() |
Ensured that ad notifications was also working as per the following:
[95960:102320:0830/140319.500:INFO:notification_helper_win.cc(200)] Notifications are enabled
[95960:102320:0830/140319.502:VERBOSE1:eligible_ad_notifications.cc(87)] Get eligible ads for parent-child segments:
[95960:102320:0830/140319.502:VERBOSE1:eligible_ad_notifications.cc(89)] sports-cycling
[95960:102320:0830/140319.502:VERBOSE1:eligible_ad_notifications.cc(89)] technology & computing-programming
[95960:102320:0830/140319.502:VERBOSE1:eligible_ad_notifications.cc(89)] travel-travel
[95960:102320:0830/140319.503:VERBOSE1:eligible_ad_notifications.cc(100)] No eligible ads for parent-child segments
[95960:102320:0830/140319.503:VERBOSE1:eligible_ad_notifications.cc(122)] Get eligible ads for parent segments:
[95960:102320:0830/140319.503:VERBOSE1:eligible_ad_notifications.cc(124)] sports
[95960:102320:0830/140319.503:VERBOSE1:eligible_ad_notifications.cc(124)] technology & computing
[95960:102320:0830/140319.503:VERBOSE1:eligible_ad_notifications.cc(124)] travel
[95960:102320:0830/140319.504:VERBOSE1:eligible_ad_notifications.cc(135)] No eligible ads for parent segments
[95960:102320:0830/140319.504:VERBOSE1:eligible_ad_notifications.cc(147)] Get eligble ads for untargeted segment
[95960:102320:0830/140319.505:VERBOSE2:ad_priority.h(32)] 18 ads with a priority of 1 in bucket 1
[95960:102320:0830/140319.505:VERBOSE1:ad_notification_serving.cc(126)] Found 18 eligible ads
[95960:102320:0830/140319.506:VERBOSE1:ad_notification_serving.cc(222)] Serving ad notification:
uuid: dd4b70e8-ba76-489e-8ac0-4cbcd3660ca1
creativeInstanceId: faec6d5b-9e30-45a5-8420-3435abe1695a
creativeSetId: 45ea5952-37ca-41f0-88c2-4b546b0e6f4b
campaignId: 1c1ac828-db13-49bb-9128-090132044b7f
advertiserId: ecbcc833-8b1d-4867-98f7-ad2341396ce8
segment: untargeted
title: Ad6
body: Ad6
targetUrl: https://brave.com
ads Example |
ads Example |
---|---|
![]() |
![]() |
@zenparsing Is there any way to test this issue on Windows as the keychain concept is not there in windows. |
@GeetaSarvadnya I haven't been able to discover how to manipulate user-based encryption keys on Windows, perhaps @emerick might know? Otherwise, it should be sufficient to follow the "Rewards wallet data is corrupted" scenario, since that will test the same code paths. |
@zenparsing To test the "Rewards wallet data is corrupted" scenario, I would need corrupted |
@zenparsing @emerick If there are no specific steps to verify the issue on Windows, probably we can add macOS and Linux label only. cc: @LaurenWags @kjozwiak |
So |
Description
One effect of the current logic is that if the wallet info cannot be decrypted (e.g., OS encryption permissions are not granted to the Brave app), then the Rewards engine may try to generate a new Wallet Payment ID, which may overwrite the previous one.
Solution
Notes
Related to:
Verify wallet
buttons unresponsive if OS keychain or encryption permissions are not allowed #15214The text was updated successfully, but these errors were encountered: