Rafficer / linux-cli-community

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

[BUG] protonvpn-cli error root / protonvpn no reconized #284

Open Aarqw12 opened 3 years ago

Aarqw12 commented 3 years ago

Describe the bug -Impossible to use protonvpn-cli in user permissions -impossible to use protonvpn command

To Reproduce [lcockx@localhost ~]$ protonvpn Usage: protonvpn init protonvpn (c | connect) [] [-p ] protonvpn (c | connect) [-f | --fastest] [-p ] protonvpn (c | connect) [--cc ] [-p ] protonvpn (c | connect) [--sc] [-p ] protonvpn (c | connect) [--p2p] [-p ] protonvpn (c | connect) [--tor] [-p ] protonvpn (c | connect) [-r | --random] [-p ] protonvpn (r | reconnect) protonvpn (d | disconnect) protonvpn (s | status) protonvpn configure protonvpn refresh protonvpn examples protonvpn (-h | --help) protonvpn (-v | --version)

[lcockx@localhost ~]$ protonvpn init [!] The program was not executed as root. [!] Please run as root.

[lcockx@localhost ~]$ sudo protonvpn init sudo: protonvpn : commande introuvable

[lcockx@localhost ~]$ protonvpn-cli c Traceback (most recent call last): File "/usr/bin/protonvpn-cli", line 33, in sys.exit(load_entry_point('protonvpn-cli==3.2.1', 'console_scripts', 'protonvpn-cli')()) File "/usr/bin/protonvpn-cli", line 25, in importlib_load_entry_point return next(matches).load()

'[lcockx@localhost ~]$ sudo su [sudo] Mot de passe de lcockx : [root@localhost lcockx]# protonvpn-cli c

Running ProtonVPN as root is not supported and is highly discouraged, as it might introduce undesirable side-effects. Are you sure that you want to proceed (y/N): y

Expected behavior

-protonvpn-cli working without root -protonvpn command reconized in root

Error Messages/Program Output/Log Messages (~/.pvpn-cli/pvpn-cli.log) If applicable, add error messages or output to help explain your problem.

2021-02-08 06:53:19,424 — protonvpn-cli — DEBUG — cli:87 — ['/home/lcockx/.local/bin/protonvpn', 'init'] 2021-02-08 06:53:19,424 — protonvpn-cli — DEBUG — cli:88 — USER: lcockx 2021-02-08 06:53:19,424 — protonvpn-cli — DEBUG — cli:89 — CONFIG_DIR: /home/lcockx/.pvpn-cli 2021-02-08 06:53:19,428 — protonvpn-cli — DEBUG — cli:92 — Arguments {'--cc': None, '--fastest': False, '--help': False, '--p2p': False, '--random': False, '--sc': False, '--tor': False, '--version': False, '-p': None, '': None, 'c': False, 'configure': False, 'connect': False, 'd': False, 'disconnect': False, 'examples': False, 'init': True, 'r': False, 'reconnect': False, 'refresh': False, 's': False, 'status': False} 2021-02-08 06:53:19,428 — protonvpn-cli — DEBUG — check_root:335 — Program wasn't executed as root

Desktop (please complete the following information):

  • OS: fedora 33
  • Python Version: Python 3.9.1
  • ProtonVPN-CLI Version: --- command no reconized

Additional context

*programms reinstalled for check : Installation: protonvpn noarch 0.1.0-1 proton-fedora-33-unstable 6.0 k Installation des dépendances: protonvpn-cli noarch 3.2.1-2 proton-fedora-33-unstable 38 k python3-babel noarch 2.8.1-1.fc33 updates 5.7 M python3-bcrypt x86_64 3.1.7-6.fc33 fedora 44 k python3-cffi x86_64 1.14.1-1.fc33 fedora 243 k python3-cryptography x86_64 3.2.1-1.fc33 updates 546 k python3-dialog noarch 3.5.1-3.fc33 fedora 90 k python3-gnupg noarch 0.4.6-2.fc33 fedora 45 k python3-jeepney noarch 0.4.3-3.fc33 fedora 4.7 M python3-jinja2 noarch 2.11.2-6.fc33 fedora 492 k python3-keyring noarch 21.8.0-1.fc33 updates 76 k python3-markupsafe x86_64 1.1.1-7.fc33 fedora 32 k python3-ply noarch 3.11-9.fc33 fedora 103 k python3-proton-client noarch 0.2.0-4 proton-fedora-33-unstable 30 k python3-protonvpn-nm-lib noarch 0.3.0-2 proton-fedora-33-unstable 89 k python3-pyOpenSSL noarch 20.0.1-1.fc33 updates 89 k python3-pycparser noarch 2.20-2.fc33 fedora 126 k python3-pyxdg noarch 0.26-11.fc33 fedora 94 k python3-secretstorage noarch 3.2.0-1.fc33 updates 34 k

Résumé de la transaction

Aarqw12 commented 3 years ago

[root@localhost lcockx]# protonvpn-cli c

Running ProtonVPN as root is not supported and is highly discouraged, as it might introduce undesirable side-effects. Are you sure that you want to proceed (y/N): y

Running ProtonVPN as root is not supported and is highly discouraged, as it might introduce undesirable side-effects. Are you sure that you want to proceed (y/N): y ERROR:dbus.proxies:Introspect error on :1.9:/modules/kwalletd5: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying ERROR:protonvpn:[!] AccessKeyringError: Failed to open keyring: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.9 was not provided by any .service files. Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 99, in connected self.handle = self.iface.open(self.iface.networkWallet(), wId, self.appid) File "/usr/lib64/python3.9/site-packages/dbus/proxies.py", line 72, in call return self._proxy_method(*args, **keywords) File "/usr/lib64/python3.9/site-packages/dbus/proxies.py", line 141, in call return self._connection.call_blocking(self._named_service, File "/usr/lib64/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking reply_message = self.send_message_with_reply_and_block( dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.9 was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/protonvpn_nm_lib/services/user_session_manager.py", line 136, in get_stored_data stored_data = keyring.get_password( File "/usr/lib/python3.9/site-packages/keyring/core.py", line 55, in get_password return get_keyring().get_password(service_name, username) File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 110, in get_password if not self.connected(service): File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 101, in connected raise InitError('Failed to open keyring: %s.' % e) keyring.errors.InitError: Failed to open keyring: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.9 was not provided by any .service files. Unable to load session. Could not access keyring.

joshuar500 commented 3 years ago

This is also happening on Ubuntu 20.04.2