Skip to content

Cancelling uninstallation on Windows breaks VPN #35006

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
mherrmann opened this issue Dec 21, 2023 · 5 comments · Fixed by brave/brave-core#21478
Closed

Cancelling uninstallation on Windows breaks VPN #35006

mherrmann opened this issue Dec 21, 2023 · 5 comments · Fixed by brave/brave-core#21478
Assignees
Labels

Comments

@mherrmann
Copy link

mherrmann commented Dec 21, 2023

Description

The uninstallation process on Windows removes the VPN services even if the user cancels the uninstaller.

The cause of the problem lies in our implementation of UninstallProduct. It removes the VPN services immediately, before calling the upstream implementation. But upstream has special handling for when the uninstallation process gets canceled. Our implementation therefore does not handle this case properly.

Steps to Reproduce

  1. Install Brave system-wide.
  2. Set up VPN.
  3. Check that VPN works.
  4. Disable VPN.
  5. Also disable the VPN tray icon (to make sure VPN isn't running, for good measure).
  6. Close Brave.
  7. Go to Add/Remove Programs.
  8. Select to uninstall Brave.
  9. Accept the UAC prompt.
  10. In the dialog "Are you sure you want to uninstall Brave?", select Cancel.
  11. Start Brave.
  12. Enable VPN.

Actual result:

An alert is shown saying that the VPN helper service is not running.

image

The reason is that the VPN services were already uninstalled before we canceled the uninstallation prompt.

Expected result:

VPN should "just work", without the alert being shown.

Reproduces how often:

Always.

Brave version (brave://version info)

1.61.104 64 bit Windows.

Version/Channel Information:

Release.

@rebron
Copy link
Collaborator

rebron commented Dec 21, 2023

cc: @bsclifton @simonhong

@rebron rebron added the priority/P2 A bad problem. We might uplift this to the next planned release. label Dec 21, 2023
@simonhong simonhong self-assigned this Jan 3, 2024
@simonhong
Copy link
Member

Checking this

@kjozwiak
Copy link
Member

kjozwiak commented Jan 4, 2024

The above requires 1.61.114 or higher for 1.61.x verification 👍

@kjozwiak kjozwiak changed the title Canceling uninstallation on Windows breaks VPN Cancelling uninstallation on Windows breaks VPN Jan 4, 2024
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jan 4, 2024

Verification PASSED on

Brave | 1.61.114 Chromium: 120.0.6099.199 (Official Build) (64-bit)
-- | --
Revision | e0f6e091fe79c029231a86e8cdcc5fbe70bcddbe
OS | Windows 10 Version 22H2 (Build 19045.3803)

Reproduced the original issue on 1.61.109 Chromium: 120.0.6099.144 using the STR/Cases outlined via #35006 (comment) as per the following:

Example Example
image image

Using the STR/Cases outlined via #35006 (comment) & brave/brave-core#21478 (comment), ensured that VPN service hasn't been removed via Services. In this case, BraveVpnService as the verification is occurring on the Release channel:

  • ensured that logging into an account that already has a VPN subscription works without any issues
    • ensured that the tokens/credentials were retrieved automatically once logged into https://account.bravesoftware.com
  • ensured that VPN is connecting/working as expected (checked several regions/locations)
  • ensured that BraveVpnService is installed via the Services tab under Task Manager

Installing & Running VPN

Example Example Example Example Example Example
image image image image image image
  • disabled Brave VPN via the panel
  • ensured that the Brave VPN appeared disabled via the tray icon
    • once the VPN was disconnected, removed the Brave VPN tray icon via Remove Icon
  • started uninstall process via Control Panel\Programs\Programs and Features
    • clicked on Cancel when prompted Are you sure you want to uninstall Brave?
  • ensured that BraveNightlyVpnService is still installed via the Services tab under Task Manager
  • relaunched Brave and ensured that you can still enable/use VPN without any issues

Uninstalling & Cancelling

Example Example Example Example Example
image image image image image

Re-enable vpn and change the region

Example Example Example Example Example Example Example
image image image image image image image

@MadhaviSeelam
Copy link

MadhaviSeelam commented Jan 4, 2024

Verification PASSED using

Brave | 1.61.114 Chromium: 120.0.6099.199 (Official Build) (64-bit)
-- | --
Revision | e0f6e091fe79c029231a86e8cdcc5fbe70bcddbe
OS | Windows 11 Version 22H2 (Build 22621.2861)

Reproduced the original issue on 1.61.109 Chromium: 120.0.6099.144 using the STR/Cases outlined via #35006 (comment) as per the following:

Example Example
Screenshot 2024-01-04 091547 Screenshot 2024-01-04 091640

Using the STR/Cases outlined via #35006 (comment) & brave/brave-core#21478 (comment), ensured that VPN service hasn't been removed via Services. In this case, BraveVpnService as the verification is occurring on the Release channel:

  • ensured that logging into an account that already has a VPN subscription works without any issues
    • ensured that the tokens/credentials were retrieved automatically once logged into https://account.bravesoftware.com
  • ensured that VPN is connecting/working as expected (checked several regions/locations)
  • ensured that BraveVpnService is installed via the Services tab under Task Manager

Installing & Running VPN

Example Example Example Example Example Example Example Example
image image image image image image image image
  • disabled Brave VPN via the panel
  • ensured that the Brave VPN appeared disabled via the tray icon
    • once the VPN was disconnected, removed the Brave VPN tray icon via Remove Icon
  • started uninstall process via Control Panel\Programs\Programs and Features
    • clicked on Cancel when prompted Are you sure you want to uninstall Brave?
  • ensured that BraveNightlyVpnService is still installed via the Services tab under Task Manager
  • relaunched Brave and ensured that you can still enable/use VPN without any issues

Uninstalling & Cancelling

Example Example Example
image image image

After launching Brave, Re-enable vpn and change the region

Example Example Example Example Example Example Example
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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants