ivpn / desktop-app

Official IVPN Desktop app
https://www.ivpn.net/apps/
GNU General Public License v3.0
322 stars 49 forks source link

[bug] (UI) OpenVPN: paused connection not resuming after defined timeout #269

Closed stenya closed 1 year ago

stenya commented 1 year ago

Bug report

Describe your environment

Describe the problem

Steps to reproduce:

  1. Connect OpenVPN
  2. Pause for 5 minutes
  3. Disable connectivity (turn off WiFi or enable OS sleep mode)
  4. Wait 5+ min
  5. Enable connectivity (turn on WiFi)

Observed Results:

The connection is still paused. But the countdown counter is not visible.

Expected Results:

Connection resumed.

stenya commented 1 year ago

The issue could be related to https://github.com/ivpn/desktop-app/issues/268

stenya commented 1 year ago

v3.10.16

gorkapernas commented 1 year ago

@stenya the issue is partially fixed, also https://github.com/ivpn/desktop-app/issues/268 which looks similar to this. Tested in all platforms.

However, I found one issue while testing this by following the steps described in the ticket.

After enabling the connectivity on Step 5, the app appears to be disconnected (at least the label says so), but the disconnecting circle is spinning permanently and the Firewall is still ON. The app does not attempt to reconnect (or resume connection) which should be the expected behaviour after enabling the connectivity. The issue only happens when the VPN connection is paused while there is no connectivity, it does not happen if disabling /enabling connectivity while the VPN is connected. See screenshot below for further details.

disconnecting state

Please follow the steps provided in the ticket, any platform.


EDIT: @stenya the app is actually trying to connect as it can be seen in the label above the server "connecting to...", but remains in reconnecting state permanently. I was confused since the connection status only has two labels "connected" and "disconnected". On a side note, should we also add the "connecting" and "disconnecting" labels to the status? This can be done on a different ticket - release.

stenya commented 1 year ago

The spinning circle indicates that OpenVPN is in the reconnecting process due to a lack of connectivity being detected. (You can see the message Connecting to.." under the selected server.) The issue was that the reconnection timeout could take up to 5 minutes (starting from 5 seconds initially and extending to 5 minutes after multiple failed reconnection attempts). Therefore, when the app is in a reconnecting timeout state and connectivity is restored, it may remain in the "reconnecting state" for up to 5 minutes.

I have updated the OpenVPN reconnection timeouts: the minimum reconnection timeout is now 2 seconds, while the maximum is 6 seconds.

On a side note, should we also add the "connecting" and "disconnecting" labels to the status? This is a UX/UI change that requires future discussion (with a designer?).

gorkapernas commented 1 year ago

@stenya thanks for the info, I noticed the app was reconnecting after I wrote my comment, so I edited it to point this out. I'll check again the behavior in the new build and let you know how it goes.

stenya commented 1 year ago

v3.10.17

gorkapernas commented 1 year ago

Verified fixed on v3.10.17, all platforms, the app now resumes the connection to the VPN successfully after the system connectivity is restored.