Rafficer/linux-cli-community

[BUG] v3.3.1 never connects on ubuntu 20.04

sprajagopal opened this issue · 6 comments

Describe the bug
A clear and concise description of what the bug is.
Stays on "Connecting" and never completes.

To Reproduce
Steps to reproduce the behavior:

  1. v3.3.1
  2. Ubuntu 20.04
  3. Free account
  4. Select any server, any protocol

Expected behavior
Should connect

Error Messages/Program Output/Log Messages (~/.cache/protonvpn/logs/protonvpn.log)

-------------------------------------------------

-----------	Initialized protonvpn-cli	-----------

-------------------------------------------------
2021-05-01 00:15:27,181 — cli.py — INFO — __init__:16 — ProtonVPN CLI v3.3.1 (protonvpn-nm-lib v0.4.2; proton-client v0.3.0)
2021-05-01 00:15:27,182 — cli.py — INFO — __init__:44 — CLI command: Namespace(command='connect', help=False, version=False)
2021-05-01 00:15:27,182 — killswitch_manager.py — INFO — __init__:62 — Initialized killswitch manager
2021-05-01 00:15:27,183 — killswitch_manager.py — INFO — check_status_connectivity_check:492 — Conn check available (1) - Conn check enabled (1)
2021-05-01 00:15:27,183 — user_manager.py — INFO — __init__:28 — Initialized UserManager: service-> "ProtonVPN"; users-> "[SessionData, UserData, ProtonUser]"
2021-05-01 00:15:27,183 — user_session_manager.py — INFO — set_optimum_keyring_backend:219 — Setting optimum backend
2021-05-01 00:15:27,186 — user_session_manager.py — INFO — set_optimum_keyring_backend:269 — Keyring backend: ('SecretService', '5', <keyring.backends.SecretService.Keyring object at 0x7f436791c1c0>)
2021-05-01 00:15:27,186 — user_session_manager.py — INFO — __init__:35 — Current DE: "Regolith:GNOME-Flashback:GNOME"
2021-05-01 00:15:27,186 — ipv6_leak_protection_manager.py — INFO — __init__:37 — Intialized IPv6 leak protection manager
2021-05-01 00:15:27,187 — cli.py — INFO — connect:107 — Options: Namespace(cc=None, fastest=True, help=False, p2p=False, protocol='udp', random=False, sc=False, servername=None, tor=False)
2021-05-01 00:15:27,187 — cli_wrapper.py — INFO — determine_protocol:787 — Determining protocol
2021-05-01 00:15:27,187 — cli_wrapper.py — INFO — get_existing_session:799 — Attempt to get existing session
2021-05-01 00:15:27,187 — user_session_manager.py — INFO — load_stored_user_session:50 — Loading stored user session
2021-05-01 00:15:27,199 — user_session_manager.py — INFO — json_session_transform:206 — Transforming session: "load"
2021-05-01 00:15:27,200 — proton_session_wrapper.py — INFO — setup_error_handling:478 — Setting up error handling
2021-05-01 00:15:27,200 — proton_session_wrapper.py — INFO — setup_exception_handling:514 — Setting up exception handling
2021-05-01 00:15:27,244 — cli_wrapper.py — INFO — get_existing_session:838 — Local session was found.
2021-05-01 00:15:27,244 — server_manager.py — INFO — validate_session:317 — Validating session
2021-05-01 00:15:27,244 — connection_manager.py — INFO — remove_connection:300 — Removing VPN connection
2021-05-01 00:15:27,254 — connection_manager.py — INFO — get_proton_connection:492 — Getting VPN connection: "all_connections"
2021-05-01 00:15:27,254 — connection_manager.py — INFO — get_proton_connection:520 — VPN connection: [<NM.RemoteConnection object at 0x7f43667f0180 (NMRemoteConnection at 0x2a01ab0)>, 'ProtonVPN JP-FREE#1']
2021-05-01 00:15:27,255 — connection_manager.py — INFO — stop_connection:264 — Stopping VPN connection
2021-05-01 00:15:27,255 — connection_manager.py — INFO — get_proton_connection:492 — Getting VPN connection: "active_connections"
2021-05-01 00:15:27,255 — connection_manager.py — INFO — get_proton_connection:520 — VPN connection: None
2021-05-01 00:15:27,255 — connection_manager.py — INFO — stop_connection:273 — Connection not found
2021-05-01 00:15:27,255 — reconnector_manager.py — INFO — check_daemon_reconnector_status:98 — Checking daemon reconnector status
2021-05-01 00:15:27,265 — ipv6_leak_protection_manager.py — INFO — manage:45 — Manage IPV6: disable
2021-05-01 00:15:27,270 — ipv6_leak_protection_manager.py — INFO — update_connection_status:148 — IPv6 status: {'pvpn-ipv6leak-protection': {'exists': True, 'is_running': True}}
2021-05-01 00:15:27,271 — ipv6_leak_protection_manager.py — INFO — remove_leak_protection:81 — Removing IPv6 leak protection
2021-05-01 00:15:27,299 — connection_manager.py — INFO — dynamic_callback:386 — Callback type: "remove"
2021-05-01 00:15:27,299 — connection_manager.py — INFO — dynamic_callback:419 — The connection profile "ProtonVPN JP-FREE#1" has been removed.
2021-05-01 00:15:27,300 — connection_manager.py — INFO — check_internet_connectivity:349 — Checking internet connectivity
2021-05-01 00:15:28,497 — cli_wrapper.py — INFO — get_ovpn_credentials:656 — Getting openvpn credentials
2021-05-01 00:15:28,552 — user_session_manager.py — INFO — json_session_transform:206 — Transforming session: "load"
2021-05-01 00:15:28,552 — cli_wrapper.py — INFO — setup_connection:503 — OpenVPN credentials fetched
2021-05-01 00:15:28,584 — server_manager.py — INFO — filter_servers:431 — Filtering servers
2021-05-01 00:15:28,600 — user_session_manager.py — INFO — json_session_transform:206 — Transforming session: "load"
2021-05-01 00:15:28,600 — server_manager.py — INFO — get_fastest_server:503 — Getting fastest server
2021-05-01 00:15:28,600 — server_manager.py — INFO — validate_protocol:337 — Validating protocol
2021-05-01 00:15:28,600 — server_manager.py — INFO — get_random_physical_server:365 — Selecting random physical server
2021-05-01 00:15:28,600 — server_manager.py — INFO — get_server_entry_exit_ip:412 — Getting entry/exit IPs
2021-05-01 00:15:28,600 — certificate_manager.py — INFO — generate_vpn_cert:36 — Generating VPN certificate
2021-05-01 00:15:28,606 — certificate_manager.py — INFO — generate_vpn_cert:77 — Servername: "JP-FREE#1"
2021-05-01 00:15:28,606 — certificate_manager.py — INFO — generate_vpn_cert:78 — Protocol: "udp"
2021-05-01 00:15:28,606 — certificate_manager.py — INFO — generate_openvpn_cert:109 — Generating OpenVPN certificate
2021-05-01 00:15:28,614 — cli_wrapper.py — INFO — setup_connection:520 — Certificate, domain and entry ip were fetched.
2021-05-01 00:15:28,614 — cli_wrapper.py — INFO — setup_connection:524 — Appending server label
2021-05-01 00:15:28,615 — connection_manager.py — INFO — add_connection:41 — Adding VPN connection
2021-05-01 00:15:28,615 — certificate_manager.py — INFO — delete_cached_certificate:172 — Deleting cached certificate
2021-05-01 00:15:28,624 — plugin_manager.py — INFO — import_connection_from_file:24 — Importing connection from file
2021-05-01 00:15:28,624 — plugin_manager.py — INFO — extract_openvpn_protocol:60 — Extracting openvpn protocol from file
2021-05-01 00:15:28,624 — plugin_manager.py — INFO — get_protocol_implementation_type:105 — Getting protocol implementation type
2021-05-01 00:15:28,624 — plugin_manager.py — INFO — get_matching_plugin:122 — Getting matching plugin
2021-05-01 00:15:28,627 — plugin_manager.py — INFO — import_connection_from_file:51 — Connection was normalized
2021-05-01 00:15:28,627 — connection_manager.py — INFO — make_vpn_user_owned:138 — Making VPN connection be user owned
2021-05-01 00:15:28,627 — connection_manager.py — INFO — add_vpn_credentials:161 — Adding OpenVPN credentials
2021-05-01 00:15:28,627 — connection_manager.py — INFO — add_server_certificate_check:208 — Adding server certificate check
2021-05-01 00:15:28,627 — connection_manager.py — INFO — apply_virtual_device_type:473 — Applying virtual device type to VPN
2021-05-01 00:15:28,627 — connection_manager.py — INFO — extract_virtual_device_type:433 — Extracting virtual device type
2021-05-01 00:15:28,628 — connection_manager.py — INFO — dns_manager:180 — DNS configs: (1, [[]])
2021-05-01 00:15:28,628 — connection_manager.py — INFO — dns_manager:190 — Applying automatic DNS
2021-05-01 00:15:28,628 — ipv6_leak_protection_manager.py — INFO — manage:45 — Manage IPV6: enable
2021-05-01 00:15:28,633 — ipv6_leak_protection_manager.py — INFO — update_connection_status:148 — IPv6 status: {'pvpn-ipv6leak-protection': {'exists': False, 'is_running': False}}
2021-05-01 00:15:28,633 — ipv6_leak_protection_manager.py — INFO — add_leak_protection:59 — Removing IPv6 leak protection
2021-05-01 00:15:28,633 — ipv6_leak_protection_manager.py — INFO — manage:45 — Manage IPV6: disable
2021-05-01 00:15:28,637 — ipv6_leak_protection_manager.py — INFO — update_connection_status:148 — IPv6 status: {'pvpn-ipv6leak-protection': {'exists': False, 'is_running': False}}
2021-05-01 00:15:28,637 — ipv6_leak_protection_manager.py — INFO — remove_leak_protection:81 — Removing IPv6 leak protection
2021-05-01 00:15:28,696 — connection_manager.py — INFO — dynamic_callback:386 — Callback type: "add"
2021-05-01 00:15:28,697 — connection_manager.py — INFO — dynamic_callback:419 — The connection profile "ProtonVPN JP-FREE#1" has been added.
2021-05-01 00:15:28,697 — certificate_manager.py — INFO — delete_cached_certificate:172 — Deleting cached certificate
2021-05-01 00:15:28,697 — connection_manager.py — INFO — get_proton_connection:492 — Getting VPN connection: "all_connections"
2021-05-01 00:15:28,706 — connection_manager.py — INFO — get_proton_connection:520 — VPN connection: [<NM.RemoteConnection object at 0x7f4365779300 (NMRemoteConnection at 0x29fe710)>, 'ProtonVPN JP-FREE#1']
2021-05-01 00:15:28,708 — connection_manager.py — INFO — start_connection:224 — Starting VPN connection
2021-05-01 00:15:28,714 — connection_manager.py — INFO — get_proton_connection:492 — Getting VPN connection: "all_connections"
2021-05-01 00:15:28,714 — connection_manager.py — INFO — get_proton_connection:520 — VPN connection: [<NM.RemoteConnection object at 0x7f43667fddc0 (NMRemoteConnection at 0x2a42d90)>, 'ProtonVPN JP-FREE#1']
2021-05-01 00:15:28,731 — connection_manager.py — INFO — dynamic_callback:386 — Callback type: "start"
2021-05-01 00:15:28,731 — connection_manager.py — INFO — dynamic_callback:419 — The connection profile "ProtonVPN JP-FREE#1" has been started.
2021-05-01 00:15:28,732 — dbus_get_wrapper.py — INFO — get_vpn_interface:208 — Get connection interface from 'proton0' virtual device.
2021-05-01 00:15:28,750 — dbus_get_wrapper.py — INFO — get_vpn_interface:248 — Found virtual device 'proton0'.
2021-05-01 00:15:28,754 — dbus_get_wrapper.py — INFO — is_protonvpn_being_prepared:196 — ProtonVPN conn info: [False, None, None]
2021-05-01 00:15:40,454 — cli_wrapper.py — INFO — CLIWrapper:41 — 

Desktop (please complete the following information):

  • OS: [e.g. Ubuntu 20.04]
  • Python Version: [e.g. 3.7.2 (python3 --version)]
  • ProtonVPN-CLI Version: [e.g. 3.3.1 (protonvpn --version)]

Additional context
I installed version 2.2.6. Works perfectly.

Same

  • OS: Ubuntu 20.04.2 LTS
  • Python: 3.8.5
  • Hardware: VirtualBox v6.1.22

Version 3.3.1 fails: protonvpn-cli c --cc US

Version 2.2.6 works: sudo protonvpn c --cc US

So I am on Arch and experiencing something similar. protonvpn-cli c --sc tries to connect forever and nothing happens except this causes my network connection to drop (I am wired, running nmtui to reconnect works fine)

I did see this in the protonvpn.log:
2021-08-15 23:20:33,289 — utilities.py — INFO — ensure_internet_connection_is_available:21 — Checking for internet connectivity 2021-08-15 23:20:33,289 — utilities.py — INFO — ensure_internet_connection_is_available:23 — Skipping as killswitch is enabled 2021-08-15 23:20:33,289 — nm_client.py — INFO — connect:89 — Starting VPN connection 2021-08-15 23:20:33,289 — nm_client.py — INFO — __get_protonvpn_connection:172 — Getting VPN from "NetworkManagerConnectionTypeEnum.ALL" connections 2021-08-15 23:20:33,289 — nm_client.py — INFO — __get_protonvpn_connection:207 — VPN connection: <NM.RemoteConnection object at 0x7effdd2fec80 (NMRemoteConne ction at 0x7effcc052250)> 2021-08-15 23:20:33,289 — nm_client_mixin.py — INFO — _start_connection_async:29 — Starting VPN connection 2021-08-15 23:20:33,304 — nm_client_mixin.py — INFO — __dynamic_callback:90 — Callback type: "start" 2021-08-15 23:20:33,304 — 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)

Which is confusing, since prior to running protonvpn-cli c, i have internet and things are working fine. NetworkManager is up and active:

● NetworkManager.service - Network Manager Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/NetworkManager.service.d └─NetworkManager-ovs.conf Active: active (running) since Sun 2021-08-15 23:08:58 PDT; 20min ago Docs: man:NetworkManager(8) Main PID: 90303 (NetworkManager) Tasks: 3 (limit: 77083) Memory: 3.8M CPU: 501ms CGroup: /system.slice/NetworkManager.service └─90303 /usr/bin/NetworkManager --no-daemon

Python Version: 3.9.6
ProtonVPN CLI Version: 3.8.0
Archlinux

Also having this exact issue on Ubunutu Server 20.04 with a Tasksel GUI install on it.

I have to power cycle the server to regain access to it.

Also having this exact issue on Ubunutu Server 20.04 with a Tasksel GUI install on it.

I have to power cycle the server to regain access to it.

Check out my reply here: ProtonVPN/linux-cli#45 (comment) .. this works to get proton-cli working, which wrongfully depends on some gui elements that I didnt have. I cant say my instructions exactly match ubuntu, but sine you have ubuntu server its likely that you are not running a GUI with all the needed parts for this to work.. so you likely have to go get them.

Also having this exact issue on Ubunutu Server 20.04 with a Tasksel GUI install on it.
I have to power cycle the server to regain access to it.

Check out my reply here: ProtonVPN/linux-cli#45 (comment) .. this works to get proton-cli working, which wrongfully depends on some gui elements that I didnt have. I cant say my instructions exactly match ubuntu, but sine you have ubuntu server its likely that you are not running a GUI with all the needed parts for this to work.. so you likely have to go get them.

Thanks for your reply. I have followed your steps with no luck.

I'm starting to think this is an issue related to the network configuration of the server which is hosted within the DigitalOcean cloud, network manager doesn't appear to be 'managing' any of the connections.

Thanks for your reply. I have followed your steps with no luck.

I'm starting to think this is an issue related to the network configuration of the server which is hosted within the DigitalOcean cloud, network manager doesn't appear to be 'managing' any of the connections.

Doh! Well worth a shot.. and yeah network manager not managing the connections might be a bit of an issue. Is it possible that you have some other network management tools running? Could be a conflict there.