mozilla-mobile / mozilla-vpn-client

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

[foxfooding] VPN does not automatically reconnect after putting my desktop to sleep which stops all internet activity on the device #3689

Closed pdehaan closed 1 year ago

pdehaan commented 2 years ago

VPN does not automatically reconnect after putting my desktop to sleep which stops all internet activity on the device. The desktop is only connected via an ethernet port and not wifi. Manually turning the VPN off and on resolves the issue but hangs and stalls the app for a bit before it disconnects. Reproduced the issue three times and got the same result, on the third time I waited 10 minutes to see if it would resolve itself and it didn't. Tried to reproduce the issue on my Windows 11 laptop but I could not.

Funny enough my experience with other products was the opposite where my desktop didn't have this issue but my laptop would

┆Issue is synchronized with this Jira Bug

data-sync-user commented 2 years ago

➤ Peter deHaan commented:

Row 20 of https://docs.google.com/spreadsheets/d/1nnhaCKuosXdIRtimbS6SwMvt-SqMWwTsjLoFnBKugO4/edit#gid=0 ( https://docs.google.com/spreadsheets/d/1nnhaCKuosXdIRtimbS6SwMvt-SqMWwTsjLoFnBKugO4/edit#gid=0|smart-link )

data-sync-user commented 2 years ago

➤ Rebecca Billings commented:

We need more details- devices, logs

Christopher-Hayes commented 2 years ago

This issue has been happening since at least February when I reported it to Mozilla VPN support. Both my Ubuntu 20.04 Thinkpad and my OS X 12.5 MBP experience this same exact issue. Every time from wake I have to disconnect and reconnect the VPN to get internet. I still have the logs I submitted to support in February if that is needed again.

data-sync-user commented 1 year ago

➤ Owen Kirby commented:

Joseph Hernandez would you be able to provide us with logs that demonstrate the issue?

Sorry for the late followup.

oskirby commented 1 year ago

@Christopher-Hayes would you be able to provide is with logs of the issue that you are experiencing on Ubuntu and OSX?

data-sync-user commented 1 year ago

➤ Owen Kirby commented:

For next steps, let’s try to reproduce this internally.

Christopher-Hayes commented 1 year ago

@Christopher-Hayes would you be able to provide is with logs of the issue that you are experiencing on Ubuntu and OSX?

At some point this stopped happening. I no longer have to restart Mozilla VPN on wake. I think it's been fixed for a few months now.

data-sync-user commented 1 year ago

➤ Joseph Hernandez commented:

This definitely still happens on Windows for me. I reproduced the issue waited a while to see if it resolves then restarted it so it would work. Let me know if there are other logs you would like me to pull.

[^vpnsleeplogs.zip]

data-sync-user commented 1 year ago

➤ Joseph Hernandez commented:

It also just happend on my laptop so adding those logs in as well

[^mozillavpn-2022-12-16-xps13laptop.txt]

data-sync-user commented 1 year ago

➤ Valentina Virlics commented:

I was able to repro this on my Windows 10 machine, using 2.15.0 (2.202305121612);

data-sync-user commented 1 year ago

➤ Lesley Norton commented:

Santiago Andrigo are we ok with this being a Medium or should we bump the priority to High?

data-sync-user commented 1 year ago

➤ Valentina Virlics commented:

We noticed that this is happening on Linux 20.04 as well while using Mozilla VPN 2.15 RC.

After reconnecting to a device that entered in stand by mode, the VPN is on, but he timer is reset.

Attaching logs - these might help us understand if the issue is that the user is no longer protected while device is in standby, or it is just a frontend issue.

data-sync-user commented 1 year ago

➤ Santiago Andrigo commented:

Bumping to high. A less tech savvy user might not realize and end up having to reboot, which is quite an annoyance.

data-sync-user commented 1 year ago

➤ Valentina Virlics commented:

Verified this across platforms while using the last Mozilla VPN 2.16.0 (2.202307061025) release build. After waking up the devices (after aprox 2-3 minutes), the following were observed:

Attaching Linux behavior;

!Screencast 2023-07-07 12_43_21.mp4|width=1920,height=1080!

Vinoo Cherian Please let us know if you need any other checks. Thank you!

data-sync-user commented 1 year ago

➤ Vinoo Cherian commented:

https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-vs-s3 ( https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-vs-s3|smart-link ) describes how network can still be active in Sleep in some newer Windows systems. I disabled this using Group Policy Editor (Run gpedit.msc), by disabling Allow network connectivity during connected-standby in Administrative Templates/System/Power Management/Sleep Settings. Then I hibernated the system using the steps in https://support.microsoft.com/en-us/windows/shut-down-sleep-or-hibernate-your-pc-2941d165-7d0a-a5e8-c5ad-8c972e8e6eff ( https://support.microsoft.com/en-us/windows/shut-down-sleep-or-hibernate-your-pc-2941d165-7d0a-a5e8-c5ad-8c972e8e6eff|smart-link ). On restarting the system, VPN sometimes showed error said that a connection was not available, presumably because the network was not yet back on, but recovered in a few seconds after the network came back on.

data-sync-user commented 1 year ago

➤ Santiago Andrigo commented:

Valentina Virlics From your findings, it looks like the issue of the VPN not reactivating itself is largely not present anymore. Is that accurate? The timer reset / no-reset issue is separate and not concerning to me.

data-sync-user commented 1 year ago

➤ Vinoo Cherian commented:

Valentina is currently on PTO. Bianca Hidecuti, would you be able to look at Santiago’s question?

data-sync-user commented 1 year ago

➤ Bianca Hidecuti commented:

Vinoo Cherian/ Santiago Andrigo, the VPN is indeed reactivating itself after returning from sleep/hibernate mode.

However, I was able to experience the issue of the VPN not reactivating itself (1 out of 3 times) after letting the device in sleep mode for a longer period of time - about 1h (latest 2.16 build - Windows 11). The VPN did not recover from the “No signal” state and I had no internet access until I turned OFF the VPN.

I am attaching logs as well.

[^Win mozillavpn-2023-7-11.txt]

!bandicam 2023-07-11 10-42-17-838.mp4|width=1816,height=1064!

data-sync-user commented 1 year ago

➤ Bianca Hidecuti commented:

We were able to reproduce the VPN not reactivating itself again, after letting the device in sleep mode, for a bit less than an hour, using the Mozilla VPN 2.16, on Windows 11.

Attaching logs as well.

[^Win 11 no signal mozillavpn-2023-7-12_2.txt]

data-sync-user commented 1 year ago

➤ Vinoo Cherian commented:

mozillavpn-2023-7-11.txt shows that the device went to sleep at 09:53:00 and resumed at 10:40:18. At 10:40:20 VPN Client App determines that it has no signal: 2153 [11.07.2023 10:40:20.799] (ConnectionHealth) Debug: Stability changed: ConnectionHealth::NoSignal

Several network errors are then logged, including these:

2238 [11.07.2023 10:40:34.293] (WindowsNetworkWatcher) Debug: The wlan code is not MSM connected

{{2798 [11.07.2023 10:42:29.562] (NetworkRequest) Error: Failed to access: https://stage.guardian.nonprod.cloudops.mozgcp.net/api/v1/vpn/account 2799 [11.07.2023 10:42:29.562] (TaskAccount) Error: Account request failed QNetworkReply::HostNotFoundError 2800 [11.07.2023 10:42:29.562] (NetworkRequest) Debug: Network reply received - status: 0 - expected: 200}}

The logs are finally written to the file at 10:43:15, so network has not recovered even ~3 minutes after returning from sleep: 2954 [11.07.2023 10:43:15.995] (LogHandler) Debug: Writing logs into: C:/Users/madalin.cotetiu/Desktop/mozillavpn-2023-7-11.txt

The daemon logs don’t show anything interesting during this time period other than the request for logs at 10:43:16: {{ 4211 [11.07.2023 09:53:01.030] (WindowsRouteMonitor) Debug: Interface 11 is valid for IPv6 routing 4212 [11.07.2023 10:40:19.124] (WindowsRouteMonitor) Debug: Routes changed 4217 [11.07.2023 10:43:16.013] (DaemonLocalServerConnection) Debug: Read Data 4218 [11.07.2023 10:43:16.013] (DaemonLocalServerConnection) Debug: Command received: logs}}

data-sync-user commented 1 year ago

➤ Bianca Hidecuti commented:

I was able to reproduce this on the latest 2.16 RC, while on Windows 11, after the device was in sleep mode for about 20 minutes. Attaching logs.

[^mozillavpn-2023-8-2.txt]

data-sync-user commented 1 year ago

➤ Vinoo Cherian commented:

Valentina Virlics Bianca Hidecuti We’ve improved error logging in 2.17 and I’ve been unable to find the root cause with the 2.16 logs. Is it possible to check if this repros in Windows with 2.17 and if so, provide logs? Thanks!

data-sync-user commented 1 year ago

➤ Bianca Hidecuti commented:

Vinoo Cherian, unfortunately we were not able to reproduce this issue today, using the latest 2.17 build, on Windows 10/11. We will give it another try tomorrow, and will attach logs as well.

data-sync-user commented 1 year ago

➤ Bianca Hidecuti commented:

We are still unable to reproduce the VPN not reactivating itself after letting the device in sleep mode, while using the 2.17 version, on Windows 10/11.

data-sync-user commented 1 year ago

➤ Vinoo Cherian commented:

Marking done, because we are unable to repro locally in 2.17 and logs are not actionable. Please open a new ticket if this issue can be reproduced in 2.17 and provide logs, because logs have been slightly improved.

data-sync-user commented 12 months ago

➤ Vinoo Cherian commented:

QA was able to repro with 2.17 and https://mozilla-hub.atlassian.net/browse/VPN-5607 ( https://mozilla-hub.atlassian.net/browse/VPN-5607|smart-link ) has been opened to track this.