mullvad / mullvadvpn-app

The Mullvad VPN client app for desktop and mobile
https://mullvad.net/
GNU General Public License v3.0
4.88k stars 335 forks source link

Tunnel State Machine Fails to create file #4847

Open grifhammer opened 1 year ago

grifhammer commented 1 year ago

Issue report

Operating system: Windows 11

App version: 2023.3

Issue description

I have previously had Mozilla VPN installed and am trying to switch to Mullvad VPN. When I try to start the VPN it errors out when starting up the split tunnel service. I have tried to dig through the code here and see what file this may be to delete it but am struggling to find where that is defined.


[2023-06-28 13:09:13.269][mullvad_api::availability][DEBUG] Pausing background API requests
[2023-06-28 13:09:13.269][mullvad_daemon::account_history][INFO] Opening account history file in C:\WINDOWS\system32\config\systemprofile\AppData\Local\Mullvad VPN\account-history.json
[2023-06-28 13:09:13.272][mullvad_daemon::target_state][DEBUG] No cached target state to load
[2023-06-28 13:09:13.274][talpid_core::split_tunnel::imp::service][DEBUG] ST driver is already installed
[2023-06-28 13:09:13.274][talpid_core::split_tunnel::imp::service][DEBUG] Starting split tunnel service
[2023-06-28 13:09:13.282][mullvad_daemon::system_service][ERROR] Error: Unable to initialize daemon
Caused by: Tunnel state machine error
Caused by: Failed to initialize split tunneling
Caused by: Failed to start driver service
Caused by: Failed to start split tunnel device driver service
Caused by: IO error in winapi call
Caused by: Cannot create a file when that file already exists. (os error 183)```
dlon commented 1 year ago

Mozilla's client also relies the driver, but it can only be in use by one client at a time. Have you fully removed their client?

Also try manually removing the ST device (requires killing both the Mullvad daemon and Mozilla's client as well):

net stop mullvadvpn
sc stop mullvad-split-tunnel
sc delete mullvad-split-tunnel

Go to Device Manager, and delete any "Mullvad split tunnel" devices, if they exist.

Restart the daemon again:

net start mullvadvpn

Hope this helps!