Skip to content
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

Improve Brave VPN region data update #29728

Closed
simonhong opened this issue Apr 14, 2023 · 2 comments · Fixed by brave/brave-core#18009
Closed

Improve Brave VPN region data update #29728

simonhong opened this issue Apr 14, 2023 · 2 comments · Fixed by brave/brave-core#18009

Comments

@simonhong
Copy link
Member

simonhong commented Apr 14, 2023

Description

When vpn region list is updated, browser should get latest one.
We have background update logic for it but we found that it's triggered 5h later after launching.
That means user should use more than 5h to get update.
We should try to update region data 5h later from the last update check.

It's difficult to have STR because region data is updated from guardian.
#29719 is another related issue.

Steps to Reproduce

  1. Launch brave with existing profile that has already purchased state
  2. Relaunching again before 5h passed
  3. Use more than 5h from launching

Actual result:

Region data is not updated - BR region is not visible from vpn panel

Expected result:

Region data is updated - BR region is visible from vpn panel

Reproduces how often:

Brave version (brave://version info)

Version/Channel Information:

  • Can you reproduce this issue with the current release?
  • Can you reproduce this issue with the beta channel?
  • Can you reproduce this issue with the nightly channel?

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
  • Does the issue resolve itself when disabling Brave Rewards?
  • Is the issue reproducible on the latest version of Chrome?

Miscellaneous Information:

@kjozwiak
Copy link
Member

kjozwiak commented May 2, 2023

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

@stephendonner
Copy link

stephendonner commented May 3, 2023

Verification PASSED using

Brave 1.51.110 Chromium: 113.0.5672.77 (Official Build) (x86_64)
Revision c4236862955e005c2187105415ac4a2ecf86dff1-refs/branch-heads/5672_62@{#3}
OS macOS Version 11.7.6 (Build 20G1231)

Steps:

  1. installed 1.51.110
  2. launched Brave using --vmodule=*/vpn/*=2 --enable-logging=stderr --v=2
  3. purchased, configured, and connected to Brave VPN
  4. shut down Brave (and disconnected from Brave VPN)
  5. advanced system clock by 6 hours
  6. relaunched Brave
  7. checked the server-region list
  8. connected to various regions

Confirmed initial and subsequent retrievals of the supported region-list entries were downloaded successfully

US (West) Brazil Japan Singapore
Screen Shot 2023-05-03 at 6 29 33 PM Screen Shot 2023-05-03 at 6 29 43 PM Screen Shot 2023-05-03 at 6 29 53 PM Screen Shot 2023-05-03 at 6 30 04 PM

Initial connection/download:

[11618:259:0503/122619.691845:VERBOSE2:brave_vpn_region_data_manager.cc(263)] FetchRegionDataIfNeeded : Start fetching region data
[11625:19715:0503/122619.692017:VERBOSE1:network_delegate.cc(35)] NetworkDelegate::NotifyBeforeURLRequest: https://connect-api.guardianapp.com/api/v1/servers/all-server-regions

After 5 hours:

[11720:259:0503/182741.174268:VERBOSE2:brave_vpn_region_data_manager.cc(300)] ParseAndCacheRegionList : has regionlist: 1
[11720:259:0503/182741.174307:VERBOSE2:brave_vpn_region_data_manager.cc(215)] LoadCachedRegionData : Loaded cached region list
[11720:28675:0503/182741.174324:VERBOSE1:command_storage_backend.cc(852)] Current session files:
[11720:259:0503/182741.174388:VERBOSE2:brave_vpn_service.cc(621)] Schedule subscriber credential fetching after 49262.8 s
[11720:259:0503/182741.174974:VERBOSE2:brave_vpn_region_data_manager.cc(263)] FetchRegionDataIfNeeded : Start fetching region data
[11720:259:0503/182741.174974:VERBOSE2:brave_vpn_region_data_manager.cc(263)] FetchRegionDataIfNeeded : Start fetching region data
[11720:259:0503/182741.175299:VERBOSE1:profile_manager.cc(1286)] AddKeepAlive(Default, kBrowserWindow). keep_alives=[kBrowserWindow (2)]
[11729:20227:0503/182741.176130:VERBOSE1:network_delegate.cc(35)] NetworkDelegate::NotifyBeforeURLRequest: https://connect-api.guardianapp.com/api/v1/servers/all-server-regions

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