Rafficer / linux-cli-community

Linux command-line client for ProtonVPN. Written in Python.
https://protonvpn.com
GNU General Public License v3.0
1.31k stars 198 forks source link

[BUG] failure to connect on Fedora 33 persisting after update #290

Closed absolutez3 closed 3 years ago

absolutez3 commented 3 years ago

Describe the bug When trying to connect I get the following output:

Adding ProtonVPN connection... Unknown error: org.freedesktop.NetworkManager.Settings.PermissionDenied: uid 1000 has no permission to perform this operation

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: -Open Terminal -Run 'protonvpn-cli c -f' -See error

Expected behavior Connection to the server, creation of interfaces such as proton0.

Error Messages/Program Output/Log Messages (~/.pvpn-cli/pvpn-cli.log) Unknown error: org.freedesktop.NetworkManager.Settings.PermissionDenied: uid 1000 has no permission to perform this operation

Desktop (please complete the following information):

-OS: Fedora 33 -Python Version: [Python 3.9.1] -ProtonVPN-CLI Version:

protonvpn-cli.noarch 3.3.1-1 @proton-fedora-33-unstable
python3-proton-client.noarch 0.3.0-1 @proton-fedora-33-unstable
python3-protonvpn-nm-lib.noarch 0.4.2-1 @proton-fedora-33-unstable

calexandru2018 commented 3 years ago

Could you specify your kernel version and NM ?

absolutez3 commented 3 years ago

Linux computer 5.10.18-200.fc33.x86_64 #1 SMP Tue Feb 23 22:06:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

nmcli tool, version 1.26.6-1.fc33

NetworkManager-1.26.6-1.fc33.src.rpm

absolutez3 commented 3 years ago

pvpn-ipv6leak-protection 9feaaad5-fd30-4dac-a756-f5c23bfc25c6 dummy --

is there with nmcli c s and with sudo nmcli c s

ProtonVPN US-NJ#14 8ffcfe3a-6049-44e7-914d-c548dd045562 vpn --
pvpn-ipv6leak-protection 9feaaad5-fd30-4dac-a756-f5c23bfc25c6 dummy --

both of them are down.

With sudo nmcli c up [protonvpn connection] --ask I can actually get that vpn connection to work but it doesn't show on the default users NetworkManager. ip address does indeed change and when using sudo nmcli I can see

ProtonVPN US-NJ#14 8ffcfe3a-6049-44e7-914d-c548dd045562 vpn wlp3s0
proton0 5d90db90-cfb2-43e7-91a0-66791ae48da4 tun proton0

absolutez3 commented 3 years ago

After bringing the interface up via root I get this from protonvpn-cli s

Traceback (most recent call last): File "/usr/bin/protonvpn-cli", line 33, in <module> sys.exit(load_entry_point('protonvpn-cli==3.3.1', 'console_scripts', 'protonvpn-cli')()) File "/usr/lib/python3.9/site-packages/protonvpn_cli/main.py", line 21, in main ProtonVPNCLI() File "/usr/lib/python3.9/site-packages/protonvpn_cli/cli.py", line 46, in __init__ getattr(self, args.command)() File "/usr/lib/python3.9/site-packages/protonvpn_cli/cli.py", line 148, in s self.status() File "/usr/lib/python3.9/site-packages/protonvpn_cli/cli.py", line 152, in status self.cli_wrapper.status() File "/usr/lib/python3.9/site-packages/protonvpn_cli/cli_wrapper.py", line 251, in status conn_status = self.connection_manager.display_connection_status() File "/usr/lib/python3.9/site-packages/protonvpn_nm_lib/services/connection_manager.py", line 341, in display_connection_status connection_exists = self.get_proton_connection(from_connections) File "/usr/lib/python3.9/site-packages/protonvpn_nm_lib/services/connection_manager.py", line 515, in get_proton_connection vpn_settings.get_data_item("dev") AttributeError: 'NoneType' object has no attribute 'get_data_item'

It returns to normal when I bring the interface down

`protonvpn-cli s

No active ProtonVPN connection. `

jenb82 commented 3 years ago

I can confirm that this issue also exists on Ubuntu 20.04.2 LTS, with both ProtonVPN CLI v3.3.1 (protonvpn-nm-lib v0.4.2; proton-client v0.3.0) and the previous version from last week. I first noticed the issue late last week.

BUT

I am able to connect to the VPN via the Ubuntu UI settings menu. It is the command line that is throwing the error.

absolutez3 commented 3 years ago

@jenb82 are you referring to using the openvpn config files?

jenb82 commented 3 years ago

@absolutez3 I don't think so, can you clarify? I'm getting the same error message as you when I run protonvpn-cli c -f, but I don't get it when I use the Ubuntu Settings > Network > VPN UI. I'm not sure how that menu works under the hood.

absolutez3 commented 3 years ago

My question is if you are somehow having a protonvpn gui on your box? Or are you just bringing the protonvpn connection up from NetworkManager? @jenb82

jenb82 commented 3 years ago

Oh, sorry, no special Proton gui, just NetworkManager. I typically use the terminal to connect.

jenb82 commented 3 years ago

@absolutez3 Update! I have two user accounts on my machine (primary + secondary), and have accessed the same ProtonVPN account from both. Using the VPN on the secondary Linux user account seems to have caused the issue.

I completely wiped the OpenVPN data for the secondary user account, and I am no longer receiving the protonvpn-cli c error on my primary user account. Everything is now working properly on my primary user account

I guessing the bug happens because Proton decides that the secondary user 'owns' the OpenVPN session, or something?

I hope this helps!

absolutez3 commented 3 years ago

@jenb82 I deleted all connections on NetworkManager with my user account and then any left over with sudo. It now works!

Hopefully they can improve protonvpn-cli so it realizes when that is happening and fixes it!

LordRishav commented 3 years ago

@absolutez3 I am still getting this error in newly installed ProtonVPN. Can you please elaborate how you managed to get it working again?