mozilla-mobile / mozilla-vpn-client

A fast, secure and easy to use VPN. Built by the makers of Firefox.
https://vpn.mozilla.org
Other
455 stars 110 forks source link

VPN fails to initiate handshake #2693

Closed JKingZapata closed 2 years ago

JKingZapata commented 2 years ago

Description

After updating to 2.7, users are unable to connect to the VPN, when tapping the switch to connect it is stuck in "attempting to confirm connection" until it switches back to off position. From the VPN logs that have been shared, it keeps trying to initiate handshake

[04.02.2022 17:12:46.473] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(c2if?MrBE) - Retrying handshake because we stopped hearing back after 15 seconds
[04.02.2022 17:12:46.473] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(c2if?MrBE) - Sending handshake initiation

Technical Information

Platform: Windows 10/11 FX product: Mozilla VPN 2.7

Steps to Reproduce

  1. Purchase a VPN subscription
  2. Install VPN on Windows
  3. Flip switch to turn On VPN

Actual Results

mozillavpn-2022-2-4 (1).txt

20220203!UNITO-UNDERSCORE!114444

┆Issue is synchronized with this Jira Bug

JKingZapata commented 2 years ago

attaching another set of VPN logs for Windows 11 mozillavpn-2022-2-9.txt

magsmoz commented 2 years ago

It seems like a full reset helps for the moment, but as soon as the device goes into sleep mode and the user turns it back on the VPN won't connect again . I see this more often on Windows 11 than 10 Here is another set of logs for Win11: mozillavpn-2022-2-7_5 (1).txt

oskirby commented 2 years ago

Looking through the logs, it seems that the problem seems to be a little bit more subtle than expected. The first thing I notice is that the Wireguard handshakes do appear complete successfully, as noticed by the following log fragment from the VPN client:

[07.02.2022 11:26:43.907] Debug: (controller - LocalSocketController) Reading
[07.02.2022 11:26:43.908] Debug: (controller - LocalSocketController) Parse command: {"pubkey":"+30LcSQzg
[07.02.2022 11:26:43.908] Debug: (controller - LocalSocketController) Handshake completed with: +30LcSQzgNtB01wyCyh4YPjItVyBFX5TP6Fs47AJSnA=
[07.02.2022 11:26:43.908] Debug: (controller - Controller) handshake completed with: +30LcSQzgNtB01wyCyh4YPjItVyBFX5TP6Fs47AJSnA=
[07.02.2022 11:26:43.908] Debug: (controller - Controller) Connected from state: Controller::StateConfirming
[07.02.2022 11:26:43.908] Debug: (controller - Controller) Setting state: Controller::StateConfirming

And likewise, we also find that the daemon successfully Received handshake response and awaited for the handshake status:

[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - Starting
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - UAPI: Created
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - UAPI: Updating endpoint
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - UAPI: Removing all allowedips
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - UAPI: Updating persistent keepalive interval
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - Sending keepalive packet
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - Sending handshake initiation
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - Routine: sequential sender - started
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - Routine: sequential receiver - started
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - UAPI: Adding allowedip
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - UAPI: Adding allowedip
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - UAPI: Adding allowedip
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - UAPI: Adding allowedip
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - UAPI: Adding allowedip
[07.02.2022 11:26:43.861] Info: (windows - tunnel.dll) [TUN] [MozillaVPN] peer(+30L?JSnA) - Received handshake response
[07.02.2022 11:26:43.907] Debug: (main - Daemon) Checking for handshake...
[07.02.2022 11:26:43.907] Debug: (main - Daemon) awaiting +30LcS...AJSnA=

However, in the client, things fall apart shortly after the handshake due to a failure to confirm the VPN connection:

[07.02.2022 11:26:51.409] Debug: (networking - PingHelper) PingHelper activated for server: 10.64.0.1
[07.02.2022 11:27:01.414] Warning: (networking - ConnectionCheck) Request timeout
[07.02.2022 11:27:01.414] Debug: (controller - Controller) Connection failed!
[07.02.2022 11:27:01.414] Debug: (controller - LocalSocketController) Deactivating
[07.02.2022 11:27:01.414] Debug: (controller - LocalSocketController) Reading
[07.02.2022 11:27:01.461] Error: (windows|networking - WindowsPingSender) failed to start Code:  1214  Message:  Das Format des angegebenen Netzwerknamens ist unzul?ssig.
  dest: 10.64.0.1

So, at first glance, it seems like the VPN is negotiating correctly with the Wireguard servers, but some kind of routing or firewall problem prevents us from being able to ping the server's internal IP address.

data-sync-user commented 2 years ago

➤ Joseph Anthony Cuevas commented:

regarding this bug CS had a user giving the following feedback : "In my case the problem of getting no connection to the VPN occurs when I am connected via ethernet. The WIFI is not disabled and it seems to be interfering with the VPN. Whenever I am connected to ethernet I have to disable WIFI manually to get Mozilla VPN to connect. On the other hand more than one ethernet connections are no problem for the VPN.To summarize: VPN works when

VPN will not work when

I hope this will help you troubleshooting.Some information on my WiFi adapter: Name: [00000002] Intel(R) Wireless-AC 9560 160MHz Adapter type: Ethernet 802.3

data-sync-user commented 2 years ago

➤ Betty Fleming commented:

Juan Zapata do we feel this is critical to fix for 2.8?

data-sync-user commented 2 years ago

➤ Juan Zapata commented:

Betty Fleming we believe it is critical to have it fixed on 2.8. We have at least 55 confirmed cases, but the number may be much higher and in some cases, our basic troubleshooting is not fixing the issue

data-sync-user commented 2 years ago

➤ Betty Fleming commented:

Juan Zapata can you provide any more information on this? We can’t reproduce it… (and please tag Owen Kirby if you have anything 🙂 )

data-sync-user commented 2 years ago

➤ Juan Zapata commented:

Betty Fleming We keep getting user reports about this issue. The majority appear to be resolved by uninstalling the VPN, deleting the App data, and reinstalling it again (though it doesn’t appear to be a permanent fix since some users have reached back to us saying they encounter the issue again and have to keep repeating our suggested workaround). We do get some users reporting that the issue happens intermittently or after restarting their device but we haven’t identified a specific condition in which it is always reproducible, so I’m not sure what other information we can collect that would be helpful other than a new set of logs.

[^mozillavpn-2022-3-22_2-3.txt]

data-sync-user commented 2 years ago

➤ Betty Fleming commented:

Owen Kirby Andrea Marchesini

data-sync-user commented 2 years ago

➤ Betty Fleming commented:

Valentina Virlics could you see if you can reproduce this?

SuperNar3k commented 2 years ago

Today I bought MozillaVPN. Same issue. I am connecting on Windows10Pro. I tried launching MozillaVPN in admin mode, giving it perms to bypass the Windows Firewall. I tried a full reset and uninstall of the application as well. Also restarted the computer a few times and updated all drivers. I tried enabling/disabling Local Network Access, I tried changin the VPN Advanced DNS Settings. Someone above mentioned that when connected to ethernet while wifi is on but not connecting could be the issue; so I turned off wifi such that only ethernet was connecting, and restarted the computer. No change. The VPN simply refuses to connect.

Attached is my log. mozillavpn-2022-4-4.txt

data-sync-user commented 2 years ago

➤ Valentina Virlics commented:

Betty Fleming We were not able to reproduce this with 2.7 or 2.8.

data-sync-user commented 2 years ago

➤ Betty Fleming commented:

Suspect that this is a firewall problem. We will explore opportunities to add telemetry/logging to try to capture this error in 2.9.

data-sync-user commented 2 years ago

➤ Owen Kirby commented:

At last, I have figured out the steps to reproduce this issue:

  1. Install Mozilla VPN on a Windows 10/11 laptop.

  2. Connect to both Wi-Fi and Ethernet, making sure that:

    1. The Ethernet is gigabit
    2. The Wi-Fi is slower than gigabit
  3. This should produce two default routes, with the Wi-Fi interface having a higher metric. You can ensure this is the case with:

    1. route print from a Windows command prompt, or
    2. Get-Route -AddressFamily IPv4 from Powershell.
  4. Disconnect the Wi-Fi interface but do not disable the interface.

  5. Attempt to start the VPN client.

data-sync-user commented 2 years ago

➤ Bianca Hidecuti commented:

Verified this as fixed on Mozilla VPN 2.8.0 (2.202204071128), on Windows 11, while following the next steps:

  1. Mozilla VPN was installed, but not turned ON;
  2. While being connected to a Wi-Fi network, the device was also connected to Ethernet;
  3. The two default routes were verified by running the “route print” command in CMD, and the Wi-Fi interface had a higher metric - see the attached screenshot;
  4. The device was disconnected from the Wi-Fi network (but the Wi-Fi was not disabled);
  5. The VPN was successfully turned ON;

Owen Kirby , is there anything else that we should check here? Thank you.

Attaching a video as well.

!image_2022_04_07T12_36_17_934Z.png|width=1553,height=682!

!fixed.mp4|width=1768,height=1036!

data-sync-user commented 2 years ago

➤ Bianca Hidecuti commented:

Verified this as fixed on Mozilla VPN 2.8.0 (2.202204071128), on Windows 11, while following the next steps:

  1. Mozilla VPN was installed, but not turned ON;
  2. While being connected to a Wi-Fi network, the device was also connected to Ethernet;
  3. The two default routes were verified by running the “route print” command in CMD, and the Wi-Fi interface had a higher metric - see the attached screenshot;
  4. The device was disconnected from the Wi-Fi network (but the Wi-Fi was not disabled);
  5. The VPN was successfully turned ON;

Owen Kirby , is there anything else that we should check here? Thank you.

Attaching a video as well.

!image_2022_04_07T12_36_17_934Z.png|width=1553,height=682!

!fixed.mp4|width=1768,height=1036!

data-sync-user commented 2 years ago

➤ Bianca Hidecuti commented:

Verified this as fixed on Mozilla VPN 2.8.0 (2.202204071128), on Windows 11, while following the next steps:

  1. Mozilla VPN was installed, but not turned ON;
  2. While being connected to a Wi-Fi network, the device was also connected to Ethernet;
  3. The two default routes were verified by running the “route print” command in CMD, and the Wi-Fi interface had a higher metric - see the attached screenshot;
  4. The device was disconnected from the Wi-Fi network (but the Wi-Fi was not disabled);
  5. The VPN was successfully turned ON;

Owen Kirby , is there anything else that we should check here? Thank you.

Attaching a video as well.

!image_2022_04_07T12_36_17_934Z.png|width=1553,height=682!

!fixed.mp4|width=1768,height=1036!

data-sync-user commented 2 years ago

➤ Bianca Hidecuti commented:

Verified this as fixed on Mozilla VPN 2.8.0 (2.202204071128), on Windows 11, while following the next steps:

  1. Mozilla VPN was installed, but not turned ON;
  2. While being connected to a Wi-Fi network, the device was also connected to Ethernet;
  3. The two default routes were verified by running the “route print” command in CMD, and the Wi-Fi interface had a higher metric - see the attached screenshot;
  4. The device was disconnected from the Wi-Fi network (but the Wi-Fi was not disabled);
  5. The VPN was successfully turned ON;

Owen Kirby , is there anything else that we should check here? Thank you.

Attaching a video as well.

!image_2022_04_07T12_36_17_934Z.png|width=1553,height=682!

!fixed.mp4|width=1768,height=1036!

pvonahsen commented 2 years ago

I experience the same problem on Win11 and connected only via WiFi Really frustrating. I was on NordVPN before and it just worked. I trust Mozilla more with my data, but this is unusable :( My logfile: mozillavpn-2022-7-13_2.txt