Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

App hangs on connection #12

Open
joshbowyer opened this issue Jun 21, 2021 · 28 comments
Open

App hangs on connection #12

joshbowyer opened this issue Jun 21, 2021 · 28 comments

Comments

@joshbowyer
Copy link

When clicking Quick Connect, the vpn connection is established but the interface is stuck on Connecting with the waiting circle animation going indefinitely.

Debian Bullseye aarch64

Also, does the Kill Switch functionality work if the app is closed but libindicator is not used (such as when using a desktop environment that does not implement it, like Phosh)?

@calexandru2018
Copy link
Collaborator

Hey @joshbowyer

Does the issue persist after the latest update ?
Also, in regards to the kill switch yes that is correct. When you don't have libindicator installed, when you press on the X the app actually ends, but the permanent Kill Switch remains in its place.

@joshbowyer
Copy link
Author

joshbowyer commented Jun 23, 2021 via email

@calexandru2018
Copy link
Collaborator

Hey @joshbowyer please ensure you're running on the latest versions.

@joshbowyer
Copy link
Author

joshbowyer commented Jun 23, 2021 via email

@joshbowyer
Copy link
Author

Are there logs I can check? Or does it just bootstrap NetworkManager?

@calexandru2018
Copy link
Collaborator

Hey @joshbowyer

You can check the logs via the following commands:

  • journalctl -eu NetworkManager
  • cd ~/.cache/protonvpn/logs && ls -la then you can choose which files you would like to look at

If you don't manage to figure it out, you're more then welcome to reach out to our incredible support team at: https://protonvpn.com/support-form which will help you out.

@joshbowyer
Copy link
Author

joshbowyer commented Jun 28, 2021

The following appears to be the issue:

protonvpn.log:2021-06-23 09:04:47,899 — nm_client_mixin.py — ERROR — __dynamic_callback:124 — Exception: NM.Client.add_connection_finish() takes exactly 2 arguments (1 given)
protonvpn.log:2021-06-23 09:04:47,967 — nm_client_mixin.py — ERROR — __dynamic_callback:124 — Exception: NM.Client.activate_connection_finish() takes exactly 2 arguments (1 given)
protonvpn.log:2021-06-23 09:08:48,276 — monitor_vpn_connection_start.py — ERROR — on_vpn_state_changed:101 — State: VPNConnectionStateEnum.FAILED ; ReasonVPNConnectionReasonEnum.UNKNOWN_ERROR ; Message: ProtonVPN connection failed due to unknown reason.

The following might be a result of the above but posting it for posterity:

protonvpn-daemon.log:2021-06-23 08:44:29,894 — dbus_daemon_reconnector.py — ERROR — manually_start_vpn_conn:272 — Unknown reconnector error: Expected a string or unicode object.
protonvpn-dbus-wrapper.log:2021-06-23 08:44:26,947 — dbus_network_manager_wrapper.py — ERROR — get_vpn_interface:306 — [!] Could not find interface belonging to 'proton0'.
protonvpn-dbus-wrapper.log:2021-06-23 08:44:29,844 — dbus_network_manager_wrapper.py — ERROR — get_active_connection:349 — org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/NetworkManager/ActiveConnection/27

@calexandru2018
Copy link
Collaborator

Hey @joshbowyer please provide also the output of journalctl -eu NetworkManager

@joshbowyer
Copy link
Author

@joshbowyer
Copy link
Author

Got a few new lines after trying again after a reboot.

Jul 07 10:04:35 mobian NetworkManager[687]: [1625670275.1629] device (pvpnroutintrf0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jul 07 10:04:35 mobian NetworkManager[687]: [1625670275.1822] device (pvpnroutintrf0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jul 07 10:04:35 mobian NetworkManager[687]: [1625670275.1837] device (pvpnroutintrf0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jul 07 10:04:35 mobian NetworkManager[687]: [1625670275.2102] device (pvpnroutintrf0): Activation: successful, device activated.
Jul 07 10:04:35 mobian NetworkManager[687]: [1625670275.6898] device (pvpnksintrf0): state change: activated -> deactivating (reason 'user-requested', sys-iface-state: 'managed')
Jul 07 10:04:35 mobian NetworkManager[687]: [1625670275.7007] audit: op="connection-deactivate" uuid="27795c5a-a5a8-4aba-906f-a582f9c32f42" name="pvpn-killswitch" pid=1560 uid=1000 result="success"
Jul 07 10:04:35 mobian NetworkManager[687]: [1625670275.7414] device (pvpnksintrf0): state change: deactivating -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
Jul 07 10:04:35 mobian NetworkManager[687]: [1625670275.7720] device (pvpnksintrf0): set-hw-addr: reset MAC address to BE:01:D1:5A:D0:78 (deactivate)
Jul 07 10:04:35 mobian NetworkManager[687]: [1625670275.8115] policy: set 'REDACTED_WIFI' (wlan0) as default for IPv4 routing and DNS
Jul 07 10:04:35 mobian NetworkManager[687]: [1625670275.9422] audit: op="connection-add" uuid="545b060d-4faa-43b6-b589-eb5bc6fa3586" name="ProtonVPN US-IL#31" pid=1560 uid=1000 result="success"
Jul 07 10:04:36 mobian NetworkManager[687]: [1625670276.0211] device (pvpnksintrf0): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed')
Jul 07 10:04:36 mobian NetworkManager[687]: [1625670276.2054] audit: op="connection-activate" uuid="545b060d-4faa-43b6-b589-eb5bc6fa3586" name="ProtonVPN US-IL#31" pid=1560 uid=1000 result="success"
Jul 07 10:04:36 mobian NetworkManager[687]: [1625670276.2444] vpn-connection[0x55a594c2e0,545b060d-4faa-43b6-b589-eb5bc6fa3586,"ProtonVPN US-IL#31",0]: Started the VPN service, PID 2059
Jul 07 10:04:36 mobian NetworkManager[687]: [1625670276.2947] vpn-connection[0x55a594c2e0,545b060d-4faa-43b6-b589-eb5bc6fa3586,"ProtonVPN US-IL#31",0]: Saw the service appear; activating connection
Jul 07 10:05:18 mobian NetworkManager[687]: [1625670318.1026] dhcp4 (ipv6leakintrf0): request timed out
Jul 07 10:05:18 mobian NetworkManager[687]: [1625670318.1029] dhcp4 (ipv6leakintrf0): state changed unknown -> timeout
Jul 07 10:08:36 mobian NetworkManager[687]: [1625670516.4009] vpn-connection[0x55a594c2e0,545b060d-4faa-43b6-b589-eb5bc6fa3586,"ProtonVPN US-IL#31",0]: Failed to request VPN secrets #3: No agents were available for this request.
Jul 07 10:08:36 mobian NetworkManager[687]: [1625670516.4434] vpn-connection[0x55a594c2e0,545b060d-4faa-43b6-b589-eb5bc6fa3586,"ProtonVPN US-IL#31",0]: VPN service disappeared
Jul 07 10:08:37 mobian NetworkManager[687]: [1625670517.4484] audit: op="connection-delete" uuid="27795c5a-a5a8-4aba-906f-a582f9c32f42" name="pvpn-killswitch" pid=2323 uid=1000 result="success"
Jul 07 10:08:37 mobian NetworkManager[687]: [1625670517.9907] device (pvpnroutintrf0): state change: activated -> deactivating (reason 'connection-removed', sys-iface-state: 'managed')
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.0199] audit: op="connection-delete" uuid="a7155836-26eb-46a7-a288-d16365cafd18" name="pvpn-routed-killswitch" pid=2327 uid=1000 result="success"
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.1627] audit: op="connection-delete" uuid="545b060d-
4faa-43b6-b589-eb5bc6fa3586" name="ProtonVPN US-IL#31" pid=1560 uid=1000 result="success"
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.1841] device (pvpnroutintrf0): state change: deactivating -> disconnected (reason 'connection-removed', sys-iface-state: 'managed')
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.2794] device (pvpnroutintrf0): set-hw-addr: reset MAC address to 2A:E8:FF:15:45:C2 (deactivate)
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.3824] device (pvpnroutintrf0): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed')
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.4671] dns-sd-resolved[0f86e58b4ee27325]: send-updates SetLinkDomains@15 failed: GDBus.Error:org.freedesktop.resolve1.NoSuchLink: Link 15 not known
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.8483] device (ipv6leakintrf0): state change: activated -> deactivating (reason 'connection-removed', sys-iface-state: 'managed')
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.8668] audit: op="connection-delete" uuid="6a072341-25f6-4ac0-84e6-a90e267b7345" name="pvpn-ipv6leak-protection" pid=2353 uid=1000 result="success"
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.9243] device (ipv6leakintrf0): state change: deactivating -> disconnected (reason 'connection-removed', sys-iface-state: 'managed')
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.9488] dhcp4 (ipv6leakintrf0): canceled DHCP transaction
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.9490] dhcp4 (ipv6leakintrf0): state changed timeout -> done
Jul 07 10:08:38 mobian NetworkManager[687]: [1625670518.9581] device (ipv6leakintrf0): set-hw-addr: reset MAC address to 0E:52:00:BE:12:73 (deactivate)
Jul 07 10:08:39 mobian NetworkManager[687]: [1625670519.0351] device (ipv6leakintrf0): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed')
Jul 07 10:08:39 mobian NetworkManager[687]: [1625670519.0425] dns-sd-resolved[0f86e58b4ee27325]: send-updates SetLinkDomains@13 failed: GDBus.Error:org.freedesktop.resolve1.NoSuchLink: Link 13 not known

@calexandru2018
Copy link
Collaborator

This seems to be the issue:
Jul 07 09:27:50 mobian NetworkManager[687]: <error> [1625668070.2668] vpn-connection[0x55acdae110,ec7217bf-bd93-4a1c-82cb-67204a8d3474,"ProtonVPN US-IL#39",0]: Failed to request VPN secrets #3: No agents were available for this request.
Jul 07 10:08:36 mobian NetworkManager[687]: [1625670516.4009] vpn-connection[0x55a594c2e0,545b060d-4faa-43b6-b589-eb5bc6fa3586,"ProtonVPN US-IL#31",0]: Failed to request VPN secrets #3: No agents were available for this request.

@joshbowyer
Copy link
Author

That stuck out to me too, but what is causing that? I have an initialized keychain

@calexandru2018
Copy link
Collaborator

calexandru2018 commented Jul 7, 2021

By noagents it can be multiple things. Either something is miss-configured or nm-applet is missing, or that the specific plugin of NM is custom made and results in undesirable effects, something very similar to this: https://manual.lubuntu.me/stable/G/AdvancedNetworking.html

@joshbowyer
Copy link
Author

joshbowyer commented Jul 7, 2021 via email

@calexandru2018
Copy link
Collaborator

@joshbowyer it's a dependency for NetworkManager to work properly.

Could you try the following:

  • Download .ovpn file from your account: https://account.protonvpn.com/
  • Import it into NM via either NM-CLI or NM-GUI
  • FIll in the openvpn data
  • Select "Store password for this user only"
  • Save the VPN connection
  • Attempt to connect
  • Provide feedback

@joshbowyer
Copy link
Author

joshbowyer commented Jul 8, 2021 via email

@regazzoj
Copy link

Hello,

I have the same issue because I am using nmtui instead of nm-applet to manage my connections.
If I run nm-applet, connection start as expected.
But I would really like to use only nmtui, do you think it is possible to do so ?

Let me know if I need to open a new issue.

Thanks for your help !

@foxfriday
Copy link

I suspect protonvpn needs nm-applet and a notification server. When I start np-applet with notifications disabled (nm-applet --no-agent), protonvpn hangs during the connection. For me, enabling notifications (taking out the --no-agent flag and having a server) fixes the problem.

@calexandru2018
Copy link
Collaborator

calexandru2018 commented Jul 28, 2021

Well the agent is needed mostly for NM because the openvpn password is stored in the keyring. Some versions of nm-applet implement this while others dont (Lubuntu and the nm-tray problem), specifically:

One thing to consider is that nm-tray does not support password asking, so either you save the password FOR ALL USERS or you will need to connect differently.

And this is key here, since the "store password only for this user" won't work on lubuntu systems that use the native nm-tray because NM will need to ask keyring for the password, thus users wanting to use our app will need to switch to nm-applet.

As an example, I'm running Manjaro with Gnome (5.10.42-1-MANJARO) and I don't have the network-manager-applet package installed. Currently, nm related packages installed on my system are:

  • nm-connection-editor <- allows to edit VPN configs via GUI
  • libnm <- network manager library
  • libnma <- network manager GUI library
  • networkmanager and it's different vpn plugins
  • glib-networking <- network extension for Glib (manage NM via glib)

@joshbowyer
Copy link
Author

joshbowyer commented Jul 28, 2021 via email

@calexandru2018
Copy link
Collaborator

@joshbowyer if you referring to

__dynamic_callback:124 — Exception: NM.Client.add_connection_finish() takes exactly 2 arguments (1 given)

Then it's most probably not the cause. If this was the cause then the results would've been different. Either way this has been fixed, and should ship with next update.

@amanzag
Copy link

amanzag commented Aug 27, 2021

I'm having a related issue (#9). I use KDE and by default this nm-applet is not running.
Protonvpn fails to connect unless I explicitly start nm-applet.

Has the dependency to nm-applet been removed?

@zerotobtc
Copy link

So we have to explicitly run nm-applet in an additional window every time we want to connect? Isn't there a workaround where nm-applet can automaticaly run in the background?...

@joshbowyer
Copy link
Author

Bumping, would it be possible to simply check for nm-applet and if its not present to connect without it? That way if its present the functionality isnt removed but if its not then it doesnt fail

@joshbowyer
Copy link
Author

Bumping again, the app is currently unusable without nm-applet and many distros now dont ship with it

@ediowar
Copy link

ediowar commented Dec 14, 2021

Is the connection established on the second try?

@joshbowyer
Copy link
Author

joshbowyer commented Dec 14, 2021 via email

@Excal-rs
Copy link

similar issue also on manjaro kde. latest protonvpn version

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants