Skip to content

Don't rely on V1ToV2Map to get device region when timezone data is fetched #44365

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

Closed
1 of 6 tasks
simonhong opened this issue Mar 3, 2025 · 2 comments · Fixed by brave/brave-core#27812
Closed
1 of 6 tasks

Comments

@simonhong
Copy link
Member

Description

This is f/u issue for #44181

Whenever timezone data is fetched, we set default region(device region) based on newly fetched timezone.
As region name from timezone data and region list data are different for same region, we tried to map timezone's region name to region list's region name. This approach is not extensible if new region is added to timezone and uses different name with region list. When it happens, we need to update map data again.

Instead of doing this, we could use ISO name. By getting current region's country iso code, we could find region name from region list as each region list has iso code.

Steps to reproduce

  1. Launch browser with fresh profile
  2. Set VPN purchased state
  3. Check default region is same with previous version

Actual result

default region is same with previous version

This issue doesn't have behavioral changes. So Actual result and expected result are same.

Expected result

default region is same with previous version

Reproduces how often

Easily reproduced

Brave version (brave://version info)

1.78.9 Chromium: 134.0.6998.39 (Official Build) nightly (x86_64)

Channel information

  • release (stable)
  • beta
  • nightly

Reproducibility

  • with Brave Shields disabled
  • with Brave Rewards disabled
  • in the latest version of Chrome

Miscellaneous information

cc @bsclifton @deeppandya

@MadhaviSeelam
Copy link

MadhaviSeelam commented Apr 15, 2025

Verification PASSED using

Brave | 1.78.82 Chromium: 135.0.7049.84 (Official Build) beta (64-bit)
-- | --
Revision | 4b464ec3ff31141fcfa4c0d3e38e0ac0ac14ddbb
OS | Windows 11 Version 24H2 (Build 26100.3476)
Case 1: USA locale - New Install - PASSED
  1. Installed 1.78.82
  2. launched Brave
  3. purchased VPN in staging (account.bravesoftware.com)
  4. enabled VPN
  5. opened whatismyipaddress.com in a new tab

Confirmed correct region is shown - default USA region is shown

step 3 step 4 results
Image Image Image
Case 2 - Israel locale - New Install - PASSED

Prerequisite: select Jerusalem time zone in Win System settings

  1. New profile/install
  2. launched Brave
  3. logged into VPN staging using Case 1 VPN credentials
  4. clicked Refresh VPN button
  5. clicked VPN button
  6. confirmed Israel was shown in the VPN panel
  7. opened whatismyipaddress.com in a new tab
  8. confirmed correct region is shown - Israel region is shown

Confirmed VPN was auto picked to Israel time zone

prereq step 4 step 5-6 step 7-8
Image Image Image Image
Case 3 - Upgrade USA locale - PASSED
  1. Installed 1.76.69 Chromium: 134.0.6998.24 (Official Build) beta (64-bit)
  2. launched Brave
  3. purchased VPN in staging (account.bravesoftware.com)
  4. clicked Refresh button
  5. VPN credentials loaded successfully
  6. enabled VPN
  7. opened brave://settings/help in a new tab
  8. upgraded to 1.78.82
  9. enabled VPN

Confirmed VPN connected successfully without issues.

step 1 step 4 step 5 step 6 step 7 step 8 step 9
Image Image Image Image Image Image Image

@MadhaviSeelam
Copy link

MadhaviSeelam commented Apr 22, 2025

Verification PASSED using

Brave | 1.78.87 Chromium: 135.0.7049.100 (Official Build) beta (arm64)
-- | --
Revision | da12a7b0c64e25b9943d4fc7ff4a68e3426b07ef
OS | macOS Version 15.3.1 (Build 24D70)
Case 1: USA locale - New Install - PASSED
  1. Installed 1.78.87
  2. launched Brave
  3. logged into VPN with existing VPN credentials (account.brave.com)
  4. clicked Refresh VPN button
  5. verified credentials loaded as expected
  6. enabled VPN
  7. opened whatismyipaddress.com in a new tab

Confirmed correct region is shown - default USA region is shown

step 3 step 4 step 5 step 7
Image Image Image Image
Case 2 - Israel locale - New Install - PASSED

Prerequisite: select Jerusalem time zone in Win System settings

  1. New profile/install
  2. launched Brave
  3. logged into VPN with existing VPN credentials (account.brave.com)
  4. clicked Refresh VPN button
  5. verified credentials loaded as expected
  6. clicked VPN button
  7. confirmed Israel was shown in the VPN panel in disconnected state
  8. toggled On in the VPN panel >>clicked Allow in the Add VPN Configurations menu
  9. opened whatismyipaddress.com in a new tab
  10. confirmed correct region is shown - Israel region is shown

Confirmed VPN was auto picked to Israel time zone

prereq step 4 step 5 step 7 step 8 step 9
Image Image Image Image Image Image
Case 3 - Upgrade USA locale - PASSED
  1. Installed 1.77.97 Chromium: 135.0.7049.84 (Official Build) (arm64)
  2. launched Brave
  3. logged into VPN with existing VPN credentials (account.brave.com)
  4. clicked Refresh button
  5. VPN credentials loaded successfully
  6. enabled VPN >> clicked Allow
  7. navigated to whatismyipaddress.com and correct region is shown
  8. closed and renamed the profile to Brave-Browser-Beta
  9. installed 1.78.87 and launched Brave
  10. enabled VPN

Confirmed VPN connected successfully without issues and correct region shown

step 1 step 4 step 5 step 6 step 7 step 9 step 10
Image Image Image Image Image Image Image

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