brave-browser icon indicating copy to clipboard operation
brave-browser copied to clipboard

[Skus] - SkusSDK does not propagate errors to the point of usage

Open Brandon-T opened this issue 10 months ago • 1 comments

Description:

  • SkusSDK can return 499 - bad request - null as an error message and we have no idea what error it is.
  • So we need to propagate errors so we can decide what to do when an error occurs.
  • This means errors and results should NOT be returned in the same string. It should explicitly return an error code with the error message upon failure. Otherwise it should return no error code (Result::Ok) and the requested data.

Steps to Reproduce

  1. Attempt to Link accounts from Mobile to Desktop
  2. Sometimes you'll get an error "Unknown"

Reproduces how often: [Easily reproduced, Intermittent Issue]

  • Easily reproduced

Brave Version:

  • All

Device details:

  • All

Brandon-T avatar Apr 04 '24 20:04 Brandon-T

Removing from the 1.66.x milestone as https://github.com/brave/brave-core/pull/22944 needs to be merged into master and then uplifted into 1.66.x if needed.

kjozwiak avatar May 09 '24 03:05 kjozwiak

Verification PASSED using

Brave | 1.69.124 Chromium: 127.0.6533.73 (Official Build) beta (64-bit)
-- | --
Revision | dbc9035349f74e493f3293d93f4cbf35c597dfec
OS | Windows 11 Version 23H2 (Build 22631.3880)

Desktop - Mobile Linking

Desktop - Desktop - Passed
  1. installed 1.69.124
  2. launched Brave
  3. loaded account.bravesoftware.com
  4. entered basic-auth credentials
  5. entered [email protected], clicked Get login link
  6. clicked the link in the email
  7. clicked Browse plans
  8. scrolled down and clicked on Buy now for Brave VPN Subscription
  9. completed the Stripe purchase flow
  10. connected VPN via VPN panel
  11. switched to another region, Brazil
  12. loaded whatismyipaddress.com and confirmed correct region is shown

Machine 1:

step 10 step 11 step 12
image image image

Machine 2:

  1. Installed 1.69.125
  2. launched Brave
  3. loaded account.bravesoftware.com
  4. entered basic-auth credentials
  5. entered [email protected], clicked Get login link
  6. clicked the link in the email
  7. clicked Refresh Brave VPN button
  8. You have Active credentials loaded! page shown
  9. connected to VPN via VPN panel successfully
  10. switched to Brazil region
  11. loaded whatismyipaddress.com and confirmed correct region is shown
step 7 step 8 step 9 step 11
image image image image
Desktop - Android - Failed
  1. Installed 1.69.125
  2. launched Brave
  3. loaded account.bravesoftware.com
  4. entered basic-auth credentials
  5. entered [email protected], clicked Get login link
  6. clicked the link in the email
  7. clicked Refresh Brave VPN button
  8. You have Active credentials loaded! page shown
  9. connected to VPN via VPN panel successfully
  10. switched to Canada region
  11. loaded whatismyipaddress.com and confirmed correct region is shown - Failed. Still shown my default region.
example example example example example
screenshot_20240726_172355_brave_-_beta_720 screenshot_20240726_172454_brave_-_beta_720 screenshot_20240726_172530_brave_-_beta_720 screenshot_20240726_172752_brave_-_beta_720 screenshot_20240726_173335_gallery_720
Desktop - iOS - PASSED

Note: tested on Brave nightly from TestFlight Build

1.Installed Brave nightly 1.70.24 2.launched Brave 3. loaded account.bravesoftware.com 4. entered basic-auth credentials 5. entered [email protected], clicked Get login link 6. clicked the link in the email 7. clicked Refresh Brave VPN button 8. You have Active credentials loaded! page shown 9. connected to VPN via VPN panel successfully 10. switched to Brazil region 11. loaded whatismyipaddress.com and confirmed correct region is shown

example example example example example
file_720 file_720 file_720 file_720 file_720

MadhaviSeelam avatar Jul 25 '24 23:07 MadhaviSeelam

Verified on Pixel 7 using version(s):

Device/OS: Pixel 7 / panther_beta-user 15 AP31.240617.009 release-keys
Brave build: 1.69.124
Chromium: 127.0.6533.73 (Official Build) beta (64-bit) 

VPN subscription link from Android to Desktop

STEPS:

  1. Launch Brave on Android
  2. Purchase VPN subscription
  3. Hamburger menu > Settings > Brave Firewall + VPN
  4. Link purchase to your Brave account
  5. Enter email > Go to email and tap the confirmation button
  6. On account.brave.com tap Link my subscription now > Confirm successful result
  7. Open Brave on Desktop > Go to account.brave.com
  8. Sign in with the same email > Confirm You have active credentials loaded! message is shown
  9. Go to www.ipinfo.io > Change VPN location in Brave > Verify results on www.ipinfo.io

ACTUAL RESULTS:

  • Verified that purchased on Android VPN subscription can be linked to Desktop
  • Verified that changing the VPN location in Brave is working and shows the correct location on www.ipinfo.io

https://github.com/user-attachments/assets/6f3e0d8e-74c3-41a2-b730-072834ed927f

hffvld avatar Jul 30 '24 23:07 hffvld

Verified on iPhone 14 using version(s):

Device/OS: iPhone 14 / iOS 17.6.1
Brave build: 1.69 (162)
BraveCore: 1.69.162 (128.0.6613.120)

Filed follow-up issue #40860

VPN subscription link from iOS to Desktop

STEPS:

  1. Launch Brave on iOS
  2. Purchase VPN subscription
  3. Hamburger menu > Settings > Brave Firewall + VPN
  4. Link purchase to your Brave account
  5. Enter email > Go to email and tap the confirmation button
  6. On account.brave.com tap Link my subscription now > Confirm successful result
  7. Open Brave on Desktop > Go to account.brave.com
  8. Sign in with the same email > Confirm You have active credentials loaded! message is shown
  9. Go to www.ipinfo.io > Change VPN location in Brave > Verify results on www.ipinfo.io

ACTUAL RESULTS:

  • Verify that purchased on iOS VPN subscription can be linked to Desktop
  • Observed an error where an active VPN subscription can't be linked to the Web

https://github.com/user-attachments/assets/4578fb4f-818f-4ff1-bb6d-caf22c28477e

hffvld avatar Sep 04 '24 19:09 hffvld