linux-app
linux-app copied to clipboard
Initializing connection hangs
Application hangs on connection via both CLI and GUI.
protonvpn.log
2021-07-20 08:50:46,569 — settings_backend.py — INFO — get_backend:13 — Settings backend: <class 'protonvpn_nm_lib.core.user_settings.default_settings_backend.Settings'>
2021-07-20 08:50:46,601 — _base.py — INFO — get_default:16 — Using "<class 'protonvpn_nm_lib.core.keyring.linuxkeyring.KeyringBackendLinuxSecretService'>" keyring
2021-07-20 08:50:46,615 — linuxkeyring.py — INFO — __getitem__:15 — Get key ProtonUser
2021-07-20 08:50:46,641 — linuxkeyring.py — INFO — __getitem__:15 — Get key SessionData
2021-07-20 08:50:46,679 — utilities.py — INFO — ensure_internet_connection_is_available:21 — Checking for internet connectivity
2021-07-20 08:50:46,686 — killswitch.py — INFO — __init__:60 — Initialized killswitch manager
2021-07-20 08:50:46,687 — killswitch.py — INFO — get_status_connectivity_check:601 — Conn check available (1) - Conn check enabled (0)
2021-07-20 08:50:46,687 — utilities.py — INFO — ensure_internet_connection_is_available:23 — Skipping as killswitch is enabled
2021-07-20 08:50:46,688 — utilities.py — INFO — ensure_api_is_reacheable:46 — Checking API connectivity
2021-07-20 08:50:46,688 — utilities.py — INFO — ensure_api_is_reacheable:49 — Skipping as killswitch is enabled
2021-07-20 08:50:46,688 — linuxkeyring.py — INFO — __getitem__:15 — Get key UserData
2021-07-20 08:50:51,656 — api.py — INFO — setup_connection:80 — Setting up connection
2021-07-20 08:50:51,656 — utilities.py — INFO — ensure_internet_connection_is_available:21 — Checking for internet connectivity
2021-07-20 08:50:51,656 — utilities.py — INFO — ensure_internet_connection_is_available:23 — Skipping as killswitch is enabled
2021-07-20 08:50:51,656 — utilities.py — INFO — ensure_api_is_reacheable:46 — Checking API connectivity
2021-07-20 08:50:51,656 — utilities.py — INFO — ensure_api_is_reacheable:49 — Skipping as killswitch is enabled
2021-07-20 08:50:51,656 — utilities.py — INFO — ensure_servername_is_valid:77 — Validating servername
2021-07-20 08:50:51,657 — utilities.py — INFO — is_protocol_valid:125 — Checking if protocol is valid
2021-07-20 08:50:51,661 — api.py — INFO — setup_connection:121 — Appended server label.
2021-07-20 08:50:51,662 — connection_metadata_backend.py — INFO — get_backend:15 — Connection metadata backend: <class 'protonvpn_nm_lib.core.metadata.default_connection_metadata.ConnectionMetadata'>
2021-07-20 08:50:51,662 — default_connection_metadata.py — INFO — save_servername:48 — Saving servername "JP-FREE#1" on "MetadataEnum.CONNECTION"
2021-07-20 08:50:51,662 — default_connection_metadata.py — INFO — save_servername:55 — Saving servername "JP-FREE#1" on "MetadataEnum.LAST_CONNECTION"
2021-07-20 08:50:51,662 — default_connection_metadata.py — INFO — save_protocol:84 — Saving protocol "ProtocolEnum.UDP" on "MetadataEnum.CONNECTION"
2021-07-20 08:50:51,663 — default_connection_metadata.py — INFO — save_protocol:91 — Saving protocol "ProtocolEnum.UDP" on "MetadataEnum.LAST_CONNECTION"
2021-07-20 08:50:51,663 — default_connection_metadata.py — INFO — save_protocol:97 — Saved protocol to file
2021-07-20 08:50:51,663 — default_connection_metadata.py — INFO — save_display_server_ip:103 — Saving exit server IP "103.125.235.22" on "MetadataEnum.CONNECTION"
2021-07-20 08:50:51,663 — default_connection_metadata.py — INFO — save_display_server_ip:110 — Saved exit ip to file
2021-07-20 08:50:51,664 — default_connection_metadata.py — INFO — save_server_ip:122 — Saving server ip "103.125.235.18" on "MetadataEnum.LAST_CONNECTION"
2021-07-20 08:50:51,664 — default_connection_metadata.py — INFO — save_server_ip:128 — Saved server IP to file
2021-07-20 08:50:51,664 — api.py — INFO — setup_connection:139 — Stored metadata to file
2021-07-20 08:50:51,681 — api.py — INFO — setup_connection:141 — Received configuration object
2021-07-20 08:50:51,713 — connection_backend.py — INFO — get_backend:14 — Connection backend: <class 'protonvpn_nm_lib.core.connection_backend.nm_client.nm_client.NetworkManagerClient'>
2021-07-20 08:50:51,713 — dbus_reconnect.py — INFO — get_hash_from_template:192 — Template hash "eaba690d7280b8111323b9b58581bdc327d6d82fcf42542d7655f40a698f739e"
2021-07-20 08:50:51,713 — dbus_reconnect.py — INFO — get_service_file_hash:222 — Generated hash at runtime "eaba690d7280b8111323b9b58581bdc327d6d82fcf42542d7655f40a698f739e"
2021-07-20 08:50:51,713 — api.py — INFO — setup_connection:144 — Setting up JP-FREE#1
2021-07-20 08:50:51,714 — nm_client.py — INFO — setup:49 — Adding VPN connection
2021-07-20 08:50:51,714 — vpn_configuration.py — INFO — generate:123 — Generating OpenVPN configuration
2021-07-20 08:50:51,724 — nm_plugin.py — INFO — import_vpn_config:37 — Connection was normalized
2021-07-20 08:50:51,724 — nm_client.py — INFO — __get_protonvpn_connection:172 — Getting VPN from "NetworkManagerConnectionTypeEnum.ACTIVE" connections
2021-07-20 08:50:51,724 — nm_client.py — INFO — __get_protonvpn_connection:207 — VPN connection: None
2021-07-20 08:50:51,724 — nm_client.py — INFO — __get_protonvpn_connection:172 — Getting VPN from "NetworkManagerConnectionTypeEnum.ALL" connections
2021-07-20 08:50:51,724 — nm_client.py — INFO — __get_protonvpn_connection:207 — VPN connection: <NM.RemoteConnection object at 0x7f6a26f99840 (NMRemoteConnection at 0x561f899e7ab0)>
2021-07-20 08:50:51,725 — nm_client_mixin.py — INFO — _remove_connection_async:45 — Removing VPN connection
2021-07-20 08:50:51,768 — nm_client_mixin.py — INFO — __dynamic_callback:90 — Callback type: "remove"
2021-07-20 08:50:51,768 — nm_client_mixin.py — ERROR — __dynamic_callback:124 — Exception: 'remove'
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client_mixin.py", line 117, in __dynamic_callback
(callback_type_dict[callback_type]["finish_function"])(result)
KeyError: 'remove'
2021-07-20 08:50:51,768 — nm_client.py — INFO — _post_disconnect:232 — Running post disconnect.
2021-07-20 08:50:51,768 — ipv6_leak_protection.py — INFO — __init__:45 — Intialized IPv6 leak protection manager
2021-07-20 08:50:51,770 — ipv6_leak_protection.py — INFO — get_status_connectivity_check:257 — Conn check available (1) - Conn check enabled (0)
2021-07-20 08:50:51,770 — dbus_reconnect.py — INFO — stop_daemon_reconnector:74 — Stopping daemon reconnector
2021-07-20 08:50:51,770 — dbus_reconnect.py — INFO — check_daemon_reconnector_status:122 — Checking daemon reconnector status
2021-07-20 08:50:51,779 — ipv6_leak_protection.py — INFO — manage:54 — Manage IPV6: KillSwitchActionEnum.DISABLE
2021-07-20 08:50:51,781 — ipv6_leak_protection.py — INFO — get_status_connectivity_check:257 — Conn check available (1) - Conn check enabled (0)
2021-07-20 08:50:51,794 — ipv6_leak_protection.py — INFO — update_connection_status:219 — IPv6 status: {'pvpn-ipv6leak-protection': {<KillSwitchInterfaceTrackerEnum.EXISTS: 0>: True, <KillSwitchInterfaceTrackerEnum.IS_RUNNING: 1>: False}}
2021-07-20 08:50:51,794 — ipv6_leak_protection.py — INFO — remove_leak_protection:108 — Removing IPv6 leak protection
2021-07-20 08:50:51,806 — ipv6_leak_protection.py — INFO — update_connection_status:219 — IPv6 status: {'pvpn-ipv6leak-protection': {<KillSwitchInterfaceTrackerEnum.EXISTS: 0>: True, <KillSwitchInterfaceTrackerEnum.IS_RUNNING: 1>: False}}
2021-07-20 08:50:51,826 — configure_openvpn_connection.py — INFO — make_vpn_user_owned:57 — Making VPN connection be user owned
2021-07-20 08:50:51,826 — configure_openvpn_connection.py — INFO — add_vpn_credentials:93 — Adding OpenVPN credentials
2021-07-20 08:50:51,826 — configure_openvpn_connection.py — INFO — add_server_certificate_check:111 — Adding server certificate check
2021-07-20 08:50:51,826 — configure_openvpn_connection.py — INFO — apply_virtual_device_type:128 — Applying virtual device type to VPN
2021-07-20 08:50:51,826 — configure_openvpn_connection.py — INFO — dns_configurator:181 — DNS configs: UserSettingStatusEnum.ENABLED - []
2021-07-20 08:50:51,827 — nm_client.py — INFO — _pre_setup_connection:221 — Running pre-setup connection.
2021-07-20 08:50:51,827 — ipv6_leak_protection.py — INFO — manage:54 — Manage IPV6: KillSwitchActionEnum.ENABLE
2021-07-20 08:50:51,841 — ipv6_leak_protection.py — INFO — get_status_connectivity_check:257 — Conn check available (1) - Conn check enabled (0)
2021-07-20 08:50:51,857 — ipv6_leak_protection.py — INFO — update_connection_status:219 — IPv6 status: {'pvpn-ipv6leak-protection': {<KillSwitchInterfaceTrackerEnum.EXISTS: 0>: False, <KillSwitchInterfaceTrackerEnum.IS_RUNNING: 1>: False}}
2021-07-20 08:50:51,857 — ipv6_leak_protection.py — INFO — add_leak_protection:75 — Adding IPv6 leak protection
2021-07-20 08:50:51,858 — ipv6_leak_protection.py — INFO — manage:54 — Manage IPV6: KillSwitchActionEnum.DISABLE
2021-07-20 08:50:51,884 — ipv6_leak_protection.py — INFO — get_status_connectivity_check:257 — Conn check available (1) - Conn check enabled (0)
2021-07-20 08:50:51,924 — ipv6_leak_protection.py — INFO — update_connection_status:219 — IPv6 status: {'pvpn-ipv6leak-protection': {<KillSwitchInterfaceTrackerEnum.EXISTS: 0>: False, <KillSwitchInterfaceTrackerEnum.IS_RUNNING: 1>: False}}
2021-07-20 08:50:51,924 — ipv6_leak_protection.py — INFO — remove_leak_protection:108 — Removing IPv6 leak protection
2021-07-20 08:50:51,933 — ipv6_leak_protection.py — INFO — update_connection_status:219 — IPv6 status: {'pvpn-ipv6leak-protection': {<KillSwitchInterfaceTrackerEnum.EXISTS: 0>: False, <KillSwitchInterfaceTrackerEnum.IS_RUNNING: 1>: False}}
2021-07-20 08:50:52,009 — nm_client_mixin.py — INFO — __dynamic_callback:90 — Callback type: "add"
2021-07-20 08:50:52,009 — nm_client_mixin.py — ERROR — __dynamic_callback:124 — Exception: NM.Client.add_connection_finish() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client_mixin.py", line 117, in __dynamic_callback
(callback_type_dict[callback_type]["finish_function"])(result)
TypeError: NM.Client.add_connection_finish() takes exactly 2 arguments (1 given)
2021-07-20 08:50:52,010 — utilities.py — INFO — ensure_internet_connection_is_available:21 — Checking for internet connectivity
2021-07-20 08:50:52,010 — utilities.py — INFO — ensure_internet_connection_is_available:23 — Skipping as killswitch is enabled
2021-07-20 08:50:52,010 — nm_client.py — INFO — connect:89 — Starting VPN connection
2021-07-20 08:50:52,010 — nm_client.py — INFO — __get_protonvpn_connection:172 — Getting VPN from "NetworkManagerConnectionTypeEnum.ALL" connections
2021-07-20 08:50:52,010 — nm_client.py — INFO — __get_protonvpn_connection:207 — VPN connection: <NM.RemoteConnection object at 0x7f6a2cad8c80 (NMRemoteConnection at 0x7f6a1c06ad30)>
2021-07-20 08:50:52,010 — nm_client_mixin.py — INFO — _start_connection_async:29 — Starting VPN connection
2021-07-20 08:50:52,016 — nm_client_mixin.py — INFO — __dynamic_callback:90 — Callback type: "start"
2021-07-20 08:50:52,016 — nm_client_mixin.py — ERROR — __dynamic_callback:124 — Exception: NM.Client.activate_connection_finish() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client_mixin.py", line 117, in __dynamic_callback
(callback_type_dict[callback_type]["finish_function"])(result)
TypeError: NM.Client.activate_connection_finish() takes exactly 2 arguments (1 given)
These errors seem to relate (especially the last one)
2021-07-20 08:50:51,725 — nm_client_mixin.py — INFO — _remove_connection_async:45 — Removing VPN connection
2021-07-20 08:50:51,768 — nm_client_mixin.py — INFO — __dynamic_callback:90 — Callback type: "remove"
2021-07-20 08:50:51,768 — nm_client_mixin.py — ERROR — __dynamic_callback:124 — Exception: 'remove'
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client_mixin.py", line 117, in __dynamic_callback
(callback_type_dict[callback_type]["finish_function"])(result)
KeyError: 'remove'
2021-07-20 08:50:52,009 — nm_client_mixin.py — INFO — __dynamic_callback:90 — Callback type: "add"
2021-07-20 08:50:52,009 — nm_client_mixin.py — ERROR — __dynamic_callback:124 — Exception: NM.Client.add_connection_finish() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client_mixin.py", line 117, in __dynamic_callback
(callback_type_dict[callback_type]["finish_function"])(result)
TypeError: NM.Client.add_connection_finish() takes exactly 2 arguments (1 given)
2021-07-20 08:50:52,016 — nm_client_mixin.py — INFO — __dynamic_callback:90 — Callback type: "start"
2021-07-20 08:50:52,016 — nm_client_mixin.py — ERROR — __dynamic_callback:124 — Exception: NM.Client.activate_connection_finish() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client_mixin.py", line 117, in __dynamic_callback
(callback_type_dict[callback_type]["finish_function"])(result)
TypeError: NM.Client.activate_connection_finish() takes exactly 2 arguments (1 given)
I'm using Archlinux
$ pacman -Qs networkmanager
local/libnm 1.32.2-1
NetworkManager client library
local/libnma 1.8.30-1
NetworkManager GUI client library
local/networkmanager 1.32.2-1
Network connection manager and user applications
local/networkmanager-openvpn 1.8.14-1
NetworkManager VPN plugin for OpenVPN
local/nm-connection-editor 1.22.0-1
NetworkManager GUI connection editor and widgets
local/python-protonvpn-nm-lib 3.3.2-1 (ProtonVPN)
Official ProtonVPN NetworkManager Library, maintained by the ProtonVPN team.
$ pacman -Qs proton
local/protonvpn-cli 3.7.2-1 (ProtonVPN)
Official ProtonVPN Command Line Interface, maintained by the ProtonVPN team.
local/protonvpn-gui 1.0.1-1 (ProtonVPN)
ProtonVPN Graphical User Interface
local/python-proton-client 0.5.1-1 (ProtonVPN)
Proton API Python Client.
local/python-protonvpn-nm-lib 3.3.2-1 (ProtonVPN)
Official ProtonVPN NetworkManager Library, maintained by the ProtonVPN team.
I'm having the same problem on Manjaro, attempting to connect just hangs, whether I try on the CLI or GUI. Can't seem to get any useful information on what's happening
Here is the log from the CLI
-------------------------------------------------
----------- Initialized protonvpn-cli -----------
-------------------------------------------------
2021-08-06 15:23:57,933 — cli.py — INFO — __init__:29 — ProtonVPN CLI v3.7.2 (protonvpn-nm-lib v3.3.2; proton-client v0.5.1)
2021-08-06 15:23:57,934 — cli.py — INFO — __init__:62 — CLI command: Namespace(command='c', version=False, help=False, get_logs=False)
2021-08-06 15:23:57,934 — cli.py — INFO — connect:126 — Options: Namespace(servername=None, fastest=True, random=False, cc=None, sc=False, p2p=False, tor=False, protocol=None, help=False)
Wanted to add that I'm also experiencing this issue on Fedora 34 with the permanent killswitch and the CLI.
protonvpn.log
2021-08-25 18:49:02,329 — nm_client.py — INFO — setup:49 — Adding VPN connection
2021-08-25 18:49:02,331 — vpn_configuration.py — INFO — generate:123 — Generating OpenVPN configuration
2021-08-25 18:49:02,376 — nm_plugin.py — INFO — import_vpn_config:37 — Connection was normalized
2021-08-25 18:49:02,376 — nm_client.py — INFO — __get_protonvpn_connection:172 — Getting VPN from "NetworkManagerConnectionTypeEnum.ACTIVE" connections
2021-08-25 18:49:02,378 — nm_client.py — INFO — __get_protonvpn_connection:207 — VPN connection: <NM.RemoteConnection object at 0x7f44c2d66c40 (NMRemoteConnection at 0x558262b05650)>
2021-08-25 18:49:02,378 — nm_client_mixin.py — INFO — _remove_connection_async:45 — Removing VPN connection
2021-08-25 18:49:02,643 — nm_client_mixin.py — INFO — __dynamic_callback:90 — Callback type: "remove"
2021-08-25 18:49:02,644 — nm_client_mixin.py — ERROR — __dynamic_callback:124 — Exception: 'remove'
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client_mixin.py", line 117, in __dynamic_callback
(callback_type_dict[callback_type]["finish_function"])(result)
KeyError: 'remove'
2021-08-25 18:49:02,645 — nm_client.py — INFO — _post_disconnect:232 — Running post disconnect.
2021-08-25 18:49:02,646 — ipv6_leak_protection.py — INFO — __init__:45 — Intialized IPv6 leak protection manager
2021-08-25 18:49:02,654 — ipv6_leak_protection.py — INFO — get_status_connectivity_check:257 — Conn check available (1) - Conn check enabled (0)
2021-08-25 18:49:02,654 — dbus_reconnect.py — INFO — stop_daemon_reconnector:74 — Stopping daemon reconnector
2021-08-25 18:49:02,654 — dbus_reconnect.py — INFO — check_daemon_reconnector_status:122 — Checking daemon reconnector status
2021-08-25 18:49:02,745 — dbus_reconnect.py — INFO — stop_daemon_reconnector:84 — Daemon status: 1
2021-08-25 18:49:02,745 — dbus_reconnect.py — INFO — daemon_reconnector_manager:94 — Managing daemon: cb_type-> "DaemonReconnectorEnum.STOP"; daemon_status -> "1"
2021-08-25 18:49:02,745 — dbus_reconnect.py — INFO — daemon_reconnector_manager:102 — Calling daemon reconnector for stop
2021-08-25 18:49:02,746 — dbus_reconnect.py — INFO — call_daemon_reconnector:158 — Calling daemon reconnector
2021-08-25 18:49:02,779 — dbus_reconnect.py — INFO — check_daemon_reconnector_status:122 — Checking daemon reconnector status
2021-08-25 18:49:02,806 — dbus_reconnect.py — INFO — daemon_reconnector_manager:109 — Daemon status after stopping: 0
2021-08-25 18:49:02,807 — ipv6_leak_protection.py — INFO — manage:54 — Manage IPV6: KillSwitchActionEnum.DISABLE
2021-08-25 18:49:02,812 — ipv6_leak_protection.py — INFO — get_status_connectivity_check:257 — Conn check available (1) - Conn check enabled (0)
2021-08-25 18:49:02,842 — ipv6_leak_protection.py — INFO — update_connection_status:219 — IPv6 status: {'pvpn-ipv6leak-protection': {<KillSwitchInterfaceTrackerEnum.EXISTS: 0>: True, <KillSwitchInterfaceTrackerEnum.IS_RUNNING: 1>: False}}
2
This was reproduced with the following bash script on the protonvpn-cli:
testVpn.sh
#!/bin/bash
echo "About to connect"
protonvpn-cli c -f
echo "After connect"
curl https://duckduckgo.com | tail
protonvpn-cli disconnect
echo "disconnected"
Which was then run as a cron job:
*/1 * * * * ./testVpn.sh >> testVpn.log 2>&1
Hey guys, not entirely sure if it was the same issue, but I have solved this thanks to a suggestion from someone at protonvpn, see this issue. Apparently, in addition to gnome-keyring
running, you need nm-applet
. I don't know why, certainly the logs give no hints to that whatsoever, but it works flawlessly with nm-applet
running. Just run nm-applet
whenever your WM/desktop starts.
Also having this issue on Fedora 34 KDE; nm-applet seems to be a GNOME thing, don't really love the idea of requiring that to fix this... Seems strange.
KDE has its own completely separate keyring daemon, so I really don't know what goes on there. I can't really blame proton for going with the keyrings because sudo
ing this all the time is pretty awful, but I got to say, they keyring daemons really are a huge pain in the ass, especially because they seem very specifically intended to work in either a "full" GNOME or "full" KDE install, so if you don't have that they behave a bit like fragile, emotionally damaged people who will give up on you if you look at them the wrong way.
I wonder if there is some purely polkit-based solution here? If I were going to do this I would probably have just used GNU PGP to stash credentials and polkit for access to NM (though, while my general linux knowledge is pretty good, my security knowledge is terrible, so there could be other reasons this is a bad idea).
Maybe unrelated, but the reason why I use ProtonVPN CLI or GUI is it allows me to use killswitch feature. I think they do not work for my environment (yet) so I would use OpenVPN solution until this is fixed.
I did a little research and found these,
I'm not a pro-sysadmin but I guess iptable solution would suffice my use case.
Same issue here. nm-applet
didn't fix this