ivpn / android-app

Official IVPN Android app
https://www.ivpn.net/apps-android
GNU General Public License v3.0
339 stars 56 forks source link

After update (APK/F-Droid), app reconnects to unexpected VPN server #225

Open jordan-ivpn opened 1 year ago

jordan-ivpn commented 1 year ago

Bug report

Describe your environment

Describe the problem

After updating the IVPN App via the website APK or via F-Droid, the app reconnects to an unexpected or unwanted VPN server location. For example, the app is connected to Japan before the update and the app reconnects to South Africa after the update. One customer reports the app reconnecting to an unexpected VPN server after a system update and a device reboot:

It happened to me after the first reboot after my OS updated recently and then once again after IVPN updated itself from F-droid store. It’s not happening anymore. I have been rebooting a lot.

Steps to reproduce:

  1. Clear install (log out from app, clear app data and cache via Android Settings > Apps, uninstall, device reboot, reinstall 2.8.5)
  2. [Optional?] Add a few servers to "Fastest server" and "Favorites" lists (my lists did not include South Africa)
  3. Connect to one of the fastest/favourite servers (I use WireGuard for testing)
  4. Reboot the device and notice reconnection to same VPN server from step 3 above
  5. Update app to 2.8.6 and check server location on reconnect (mine was South Africa)
  6. Reboot the device (mine reconnected to same server from step 3)

Observed Results:

Immediately after the app update, the app reconnects to an unexpected server (South Africa in my case). The customer reported being connected to East and West Coast US servers, which was neither expected nor wanted. The customer had EU servers in the fastest/favourite lists.

Expected Results:

Reconnect to the same server from before the update or pick a server from the fastest/favourite list.

Might be associated with #206 in that a blacklist would prevent the app from reconnecting to an unexpected or unwanted server location.

--

Thanks.

gorkapernas commented 2 months ago

@jurajhilje I also observe this issue frequently, but there are simpler steps to reproduce it.

Steps:

  1. Enable Always-on, so the app connects at launch.
  2. Select the fastest server (not ZA).
  3. If connected to the VPN, disconnect.
  4. Close the app and relaunch it.
  5. Observe that the app connects to ZA, Johannesburg (even if ZA is disabled in the faster server configuration).

It looks like the app connects to the VPN before pinging all servers, so by default ZA is selected first which is normally the last in the list of servers. I'm not sure if we can improve this at this point.