brave / brave-browser

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

incorrect rewards environment appears to be cached when attempting to connect to custodian #28550

Open LaurenWags opened 1 year ago

LaurenWags commented 1 year ago

Description

This is a problem likely unique to QA and perhaps development, not a problem that users are likely to face:

When you are connected to a custodian on staging environment and you accidentally launch the browser with production environment (not staging), you get logged out of the custodian which makes sense. If you try to login, you notice you're on production as expected so you close and relaunch w/ staging command line flags. However, after relaunching you cannot connect to custodian's sandbox as something appears to be caching the call to production.

Steps to Reproduce

  1. Clean profile, launch w/ staging command line flags
  2. Close/relaunch again w/ staging command line flags (not sure if necessary, but this pulls griffin seed)
  3. Join Rewards, link staging Uphold account
  4. Confirm successful (can see balance)
  5. Close browser
  6. Launch without staging command line flags
  7. See that I am logged out from Uphold (expected since Rewards is expecting Uphold sandbox, but is getting production)
  8. Click to login to uphold from panel or brave://rewards --> see production Uphold site (expected since I am not running with staging command line)
  9. Close Uphold tab
  10. Close browser
  11. Relaunch with staging command line flags
  12. Attempt to login to Uphold from panel or brave://rewards --> Still see production Uphold site but should see their sandbox site since I am now running with staging command line

Actual result:

Unable to reconnect to sandbox custodian

Expected result:

able to reconnect to sandbox custodian

Reproduces how often:

easily

Brave version (brave://version info)

1.48.x (@LaurenWags reproduced), 1.50.x (@MadhaviSeelam reproduced)

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

cc @Miyayes

emerick commented 1 year ago

@LaurenWags I can't seem to repro this using the latest master. Specifically, at step 7 I'm not logged out. Curious if you're still seeing this on the latest nightlies?

LaurenWags commented 1 year ago

@emerick interesting, I did get logged out at step 7 (opened panel to confirm).

Followed STR from description, here are some screenshots (not sure if they're helpful):

Step 4 Step 7 Step 8 Step 12 Step 12
4 7 8 11 12

Used below version:

Brave | 1.51.31 Chromium: 111.0.5563.64 (Official Build) nightly (x86_64)
-- | --
Revision | c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}
OS | macOS Version 12.6.3 (Build 21G419)