Giter Site home page Giter Site logo

App hangs on connection about linux-app HOT 28 OPEN

protonvpn avatar protonvpn commented on July 20, 2024 1
App hangs on connection

from linux-app.

Comments (28)

foxfriday avatar foxfriday commented on July 20, 2024 1

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.

from linux-app.

calexandru2018 avatar calexandru2018 commented on July 20, 2024 1

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)

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024 1

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

from linux-app.

calexandru2018 avatar calexandru2018 commented on July 20, 2024

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.

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

from linux-app.

calexandru2018 avatar calexandru2018 commented on July 20, 2024

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

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

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

from linux-app.

calexandru2018 avatar calexandru2018 commented on July 20, 2024

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.

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

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

from linux-app.

calexandru2018 avatar calexandru2018 commented on July 20, 2024

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

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

https://pastebin.com/Zazx6Fqh

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

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

from linux-app.

calexandru2018 avatar calexandru2018 commented on July 20, 2024

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.

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

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

from linux-app.

calexandru2018 avatar calexandru2018 commented on July 20, 2024

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

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

from linux-app.

calexandru2018 avatar calexandru2018 commented on July 20, 2024

@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

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

from linux-app.

regazzoj avatar regazzoj commented on July 20, 2024

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 !

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

from linux-app.

calexandru2018 avatar calexandru2018 commented on July 20, 2024

@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.

from linux-app.

amanzag avatar amanzag commented on July 20, 2024

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?

from linux-app.

zerotobtc avatar zerotobtc commented on July 20, 2024

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?...

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

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

from linux-app.

ediowar avatar ediowar commented on July 20, 2024

Is the connection established on the second try?

from linux-app.

joshbowyer avatar joshbowyer commented on July 20, 2024

from linux-app.

Excal-rs avatar Excal-rs commented on July 20, 2024

similar issue also on manjaro kde. latest protonvpn version

from linux-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.