linux-cli icon indicating copy to clipboard operation
linux-cli copied to clipboard

An unknown error has occured. Please ensure that you have internet connectivity. If the issue persists, please contact support.

Open acc-galenicum opened this issue 3 years ago • 42 comments

Hi, I'm working in a GCP Debian 10 linux machine, no graphic interface. I installed the protonvpn-stable-release and protonvpn-cli following instructions here: https://protonvpn.com/support/linux-vpn-tool/

I am able to login, but when I try to connect to a proxy (protonvpn-cli c -f) it returns me this error:

An unknown error has occured. Please ensure that you have internet connectivity. If the issue persists, please contact support.

Not much information to understand the error...

I've tried to find solutions and read similar problems, but nothing seems to match exactly my case.

Any help would be appreciated!

acc-galenicum avatar Feb 09 '22 15:02 acc-galenicum

Same for me

iMerica avatar Feb 13 '22 03:02 iMerica

Same for me on Ubuntu 18.04 for protonvpn-cli 3.11.0-7

astartav avatar Mar 05 '22 12:03 astartav

It happens to me too, with ProtonVPN CLI v3.11.1 (protonvpn-nm-lib v3.8.0; proton-client v0.7.1). OS infos:

OS: Arch Linux x86_64
Kernel: 5.16.15-arch1-1
WM: i3

Anglodel avatar Mar 21 '22 10:03 Anglodel

  • archlinux, 5.15.32-1-lts

Morion-Self avatar Mar 29 '22 19:03 Morion-Self

UPD: I had the networkmanager-strongswan package installed. There was such an error in the logs:

2022-03-29 19:32:43,294 — cli_wrapper.py — ERROR — connect:379 — nm-vpn-plugin-error-quark: cannot load plugin "/usr/lib/NetworkManager/libnm-vpn-plugin-strongswan.so": libnma.so.0: cannot open shared object file: No such file or directory (0)
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/protonvpn_cli/cli_wrapper.py", line 277, in connect
    self.protonvpn.setup_connection(
  File "/usr/lib/python3.10/site-packages/protonvpn_nm_lib/api.py", line 153, in setup_connection
    self._env.connection_backend.setup(**data)
  File "/usr/lib/python3.10/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client.py", line 51, in setup
    connection, protocol_implementation = NMPlugin.import_vpn_config(
  File "/usr/lib/python3.10/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/plugin/nm_plugin.py", line 21, in import_vpn_config
    plugin_editor = plugin.load_editor_plugin()
gi.repository.GLib.GError: nm-vpn-plugin-error-quark: cannot load plugin "/usr/lib/NetworkManager/libnm-vpn-plugin-strongswan.so": libnma.so.0: cannot open shared object file: No such file or directory (0)

After deleting the networkmanager-strongswan, it was possible to connect. But this is not a solution, because I need these package

Morion-Self avatar Mar 29 '22 19:03 Morion-Self

I fixed it by doing the following. If you type protonvpn-cli --get-logs the folder containing the logs will be opened. protonvpn-cli.log is the one containing the error (in my case) The log ended with the following traceback: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files so i started network manager and i could connect. sudo systemctl start NetworkManager But while i was connected with a dutch server, my internet was not working. So i enabled network manager and rebooted. sudo systemctl enable NetworkManager After reboot all worked as it should.

I hope this helps you guys too.

UPD: I had the networkmanager-strongswan package installed. There was such an error in the logs:

2022-03-29 19:32:43,294 — cli_wrapper.py — ERROR — connect:379 — nm-vpn-plugin-error-quark: cannot load plugin "/usr/lib/NetworkManager/libnm-vpn-plugin-strongswan.so": libnma.so.0: cannot open shared object file: No such file or directory (0)
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/protonvpn_cli/cli_wrapper.py", line 277, in connect
    self.protonvpn.setup_connection(
  File "/usr/lib/python3.10/site-packages/protonvpn_nm_lib/api.py", line 153, in setup_connection
    self._env.connection_backend.setup(**data)
  File "/usr/lib/python3.10/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client.py", line 51, in setup
    connection, protocol_implementation = NMPlugin.import_vpn_config(
  File "/usr/lib/python3.10/site-packages/protonvpn_nm_lib/core/connection_backend/nm_client/plugin/nm_plugin.py", line 21, in import_vpn_config
    plugin_editor = plugin.load_editor_plugin()
gi.repository.GLib.GError: nm-vpn-plugin-error-quark: cannot load plugin "/usr/lib/NetworkManager/libnm-vpn-plugin-strongswan.so": libnma.so.0: cannot open shared object file: No such file or directory (0)

After deleting the networkmanager-strongswan, it was possible to connect. But this is not a solution, because I need these package

Maybe you can resolve this issue by creating a symlink in "/usr/lib/NetworkManager/libnm-vpn-plugin-strongswan.so"

bi7je avatar Mar 29 '22 19:03 bi7je

Just installed on Ubuntu server 22.04 LTS (jammy) using Proton VPN CLI v3.12.0 (protonvpn-nm-lib v3.10.0; proton-client v0.7.1) and connecting via UDP connection. I have tried using renderer in Netplan as NetworkManager, but this made no difference.

Setting up Proton VPN.

An unknown error has occured. Please ensure that you have internet connectivity.
If the issue persists, please contact support.

marekpetak avatar May 30 '22 14:05 marekpetak

Just installed on Ubuntu server 20.04.3 LTS using Proton VPN CLI v3.12.0 (protonvpn-nm-lib v3.11.0; proton-client v0.7.1) and connecting via UDP connection. Not able to connect

Setting up Proton VPN.

An unknown error has occured. Please ensure that you have internet connectivity.
If the issue persists, please contact support.

thramas avatar Jun 25 '22 19:06 thramas

Same issue persists for several months. (Proton VPN CLI v3.12.0 (protonvpn-nm-lib v3.11.0; proton-client v0.7.1))

Linux demetrio 5.4.0-109-generic #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Message from newest client (just upgraded) is:

$protonvpn-cli c -f

Setting up Proton VPN.
Connecting to Proton VPN on JP-FREE#3 with UDP.

Unable to connect to Proton VPN: Proton VPN connection has been disconnected. Reason: VPNConnectionReasonEnum.UNKNOWN_ERROR

Earlier client version just printed:

Setting up Proton VPN.

An unknown error has occured. Please ensure that you have internet connectivity.
If the issue persists, please contact support.

Legacy cli client:

$protonvpn -v
ProtonVPN-CLI v2.2.4

Prints next output:

$sudo protonvpn c -f

There is already a VPN connection running.
Terminating previous connection...
Connecting to US-FREE#49 via UDP...
[!] There was an error with accessing the ProtonVPN API.
[!] Please make sure your connection is working properly!
[!] HTTP Error Code: 422

But looks like it is actually connects, because I was able to get access to blocked resources, while newest versions is not working at all.

P/S: Servers from VPN Plus (Basic previously) plan also doesn't work. P/P/S: I'm really thinking about stop my subscription and switch to another VPN service provider, please fix this issue. P/P/P/S: Android client connected to the same WiFi works well, but I have two laptops with ubuntu and both doesn't work, so I believe issue relates exactly to a client, not network.

I know there is protonvpn-cli --get-logs command, but it generates a folder (30mb) with a lot of files, and I'm paranoid about sending it because probably some of them may contain sensitive data. I don't know but maybe you can add -v attribute that prints all steps while connecting for such situations and output all things that may go wrong?

Demetri0 avatar Jul 02 '22 23:07 Demetri0

I had this problem recently, and deleting ~/.cache/protonvpn fixed this. May need to run protonvpn-cli d once before/after doing it.

MuhammedZakir avatar Jul 03 '22 03:07 MuhammedZakir

Deleting ~/.cache/protonvpn doesn't help.

But I found a logs in this folder:

protonvpn-cli.log

2022-07-03 08:00:47,613 — cli.py — INFO — __init__:17 — 
-------------------------------------------------

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


2022-07-03 08:00:47,613 — cli.py — INFO — init:29 — Proton VPN CLI v3.12.0 (protonvpn-nm-lib v3.11.0; proton-client v0.7.1) 2022-07-03 08:00:47,616 — cli.py — INFO — init:64 — CLI command: Namespace(command='d', get_logs=False, help=False, version=False) 2022-07-03 08:00:54,738 — cli.py — INFO — init:17 —

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


2022-07-03 08:00:54,738 — cli.py — INFO — init:29 — Proton VPN CLI v3.12.0 (protonvpn-nm-lib v3.11.0; proton-client v0.7.1) 2022-07-03 08:00:54,740 — cli.py — INFO — init:64 — CLI command: Namespace(command='c', get_logs=False, help=False, version=False) 2022-07-03 08:00:54,741 — cli.py — INFO — connect:128 — Options: Namespace(cc=None, fastest=True, help=False, p2p=False, protocol=None, random=False, sc=False, servername=None, tor=False) 2022-07-03 08:01:05,219 — cli_wrapper.py — ERROR — connect:379 — No internet connection. Please make sure you are connected and retry. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn conn = connection.create_connection( File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) OSError: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect conn = self._new_conn() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fcc3f1558e0>: Failed to establish a new connection: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='protonstatus.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fcc3f1558e0>: Failed to establish a new connection: [Errno 113] No route to host'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/utilities.py", line 26, in ensure_internet_connection_is_available requests.get( File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get return request('get', url, params=params, **kwargs) File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='protonstatus.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fcc3f1558e0>: Failed to establish a new connection: [Errno 113] No route to host'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/protonvpn_cli/cli_wrapper.py", line 277, in connect self.protonvpn.setup_connection( File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/api.py", line 93, in setup_connection self._utils.ensure_internet_connection_is_available() File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/utilities.py", line 38, in ensure_internet_connection_is_available raise exceptions.NetworkConnectionError( protonvpn_nm_lib.exceptions.NetworkConnectionError: No internet connection. Please make sure you are connected and retry.

$ping protonstatus.com

PING protonstatus.com (188.114.97.1) 56(84) bytes of data.
64 bytes from 188.114.97.1 (188.114.97.1): icmp_seq=1 ttl=53 time=66.0 ms
64 bytes from 188.114.97.1 (188.114.97.1): icmp_seq=2 ttl=53 time=65.9 ms
^C
--- protonstatus.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 65.923/65.985/66.047/0.062 ms

Demetri0 avatar Jul 03 '22 08:07 Demetri0

IIRC, I also had a similiar issue [1]. ProtonVPN logs it couldn't connect to ProtonVPN server when it works fine in other devices connected to same network, and it started working when I deleted the cache folder. So there's something really wrong with the library related to connectivity.

Edit: What I mean is that I also saw that in the log (iirc).

MuhammedZakir avatar Jul 03 '22 11:07 MuhammedZakir

Same problem in ChromeOS. Just installed and tried to run it, after logging into it.

arakakivl avatar Jul 13 '22 02:07 arakakivl

2022-08-05 07:43:19,135 — cli.py — INFO — __init__:29 — Proton VPN CLI v3.12.0 (protonvpn-nm-lib v3.11.0; proton-client v0.7.1)
2022-08-05 07:43:19,137 — cli.py — INFO — __init__:64 — CLI command: Namespace(command='c', get_logs=False, help=False, version=False)
2022-08-05 07:43:19,137 — cli.py — INFO — connect
2022-08-05 07:43:21,356 — cli_wrapper.py — ERROR — connect:379 — cannot import name 'soft_unicode' from 'markupsafe' (/home/a112/.local/lib/python3.8/site-packages/markupsafe/__init__.py)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/protonvpn_cli/cli_wrapper.py", line 277, in connect
    self.protonvpn.setup_connection(
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/api.py", line 153, in setup_connection
    configuration = physical_server.get_configuration(_protocol)
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/servers/list.py", line 53, in get_configuration
    from ..vpn import VPNConfiguration
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/vpn/__init__.py", line 1, in <module>
    from .vpn_configuration import VPNConfiguration
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/vpn/vpn_configuration.py", line 5, in <module>
    import jinja2
  File "/usr/lib/python3/dist-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 15, in <module>
    from jinja2 import nodes
  File "/usr/lib/python3/dist-packages/jinja2/nodes.py", line 23, in <module>
    from jinja2.utils import Markup
  File "/usr/lib/python3/dist-packages/jinja2/utils.py", line 656, in <module>
    from markupsafe import Markup, escape, soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/a112/.local/lib/python3.8/site-packages/markupsafe/__init__.py)
2022-08-05 07:44:14,912 — cli.py — INFO — __init__:17 — 

https://github.com/dbt-labs/dbt-core/issues/4745#issuecomment-1043953804

image

Doing ^ and re-running the CLI / restarting my GUI worked for me.

inconspicuous99 avatar Aug 05 '22 07:08 inconspicuous99

Setting up Proton VPN. An unknown error has occured. Please ensure that you have internet connectivity. If the issue persists, please contact support.

same..

braintxx avatar Aug 21 '22 17:08 braintxx

I had this problem recently, and deleting ~/.cache/protonvpn fixed this. May need to run protonvpn-cli d once before/after doing it.

This works for me. I deleted and ran protonvpn-cli after and it connects now.

cruzerngz avatar Sep 04 '22 09:09 cruzerngz

has anyone got this working?

martinezhermes avatar Oct 26 '22 14:10 martinezhermes

Some few days ago I had this issue again, but in arch linux then. Solved by running nm-applet before trying to connect to it.

arakakivl avatar Oct 28 '22 02:10 arakakivl

I have this same issue on fedora 36. Oddly it works fine from a terminal window within gnome on the box... but if I ssh in to that same box and try the same protonvpn-cli command it fails with this message...


An unknown error has occured. Please ensure that you have internet connectivity.
If the issue persists, please contact support.

The main reason I want to be able to use the cli is so I can ssh into a box and connect it to a vpn so why it doesn't work while sshed in but does work while in a terminal on a box is beyond me.

Ok so if I follow the journal and issue the protonvpn-cli command I get this if I am sshed in...

Nov 14 11:09:15 sys76 NetworkManager[8183]: <info>  [1668442155.1003] audit: op="connection-add" pid=248358 uid=1010 result="fail" reason="Insufficient privileges"

If I preface the command with sudo I get a warning that running it as root is not supported and is highly discouraged.

What would make the permissions of my terminal user within gnome differ from my permissions as that same use while ssh-ed in?

pghpete avatar Nov 14 '22 16:11 pghpete

Found a solution to my problem above... (at least on Fedora 35)

create this file as root, change USER for your user name....

cat /var/lib/polkit-1/localauthority/50-local.d/10-network-manager.pkla
[allow USER to modify all network states and settings]
Identity=unix-user:USER
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

systemctl restart NetworkManager

pghpete avatar Nov 14 '22 16:11 pghpete

Found a solution to my problem above... (at least on Fedora 35)

create this file as root, change USER for your user name....

cat /var/lib/polkit-1/localauthority/50-local.d/10-network-manager.pkla
[allow USER to modify all network states and settings]
Identity=unix-user:USER
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

systemctl restart NetworkManager

This solution moved me along one step on Ubuntu 22.04.1 LTS Server. However connect command gets stuck connecting to any server.

nathant8883 avatar Nov 15 '22 14:11 nathant8883

Found a solution to my problem above... (at least on Fedora 35) create this file as root, change USER for your user name....

cat /var/lib/polkit-1/localauthority/50-local.d/10-network-manager.pkla
[allow USER to modify all network states and settings]
Identity=unix-user:USER
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

systemctl restart NetworkManager

This solution moved me along one step on Ubuntu 22.04.1 LTS Server. However connect command gets stuck connecting to any server.

I am also at this point. Stuck for now...

Bodmoor avatar Nov 19 '22 07:11 Bodmoor

Same for me on Ubuntu Server 22.04 LTS on a Raspberry Pi 2 model B.

Proton version:

Proton VPN CLI v3.13.0 (protonvpn-nm-lib v3.14.0; proton-client v0.7.1)

System info:

$ uname -a
Linux ubuntu 5.19.0-1006-raspi #13-Ubuntu SMP PREEMPT Mon Oct 17 19:03:10 UTC 2022 armv7l armv7l armv7l GNU/Linux

acobster avatar Nov 29 '22 08:11 acobster

Same for me. So close. Proton VPN CLI v3.13.0 (protonvpn-nm-lib v3.14.0; proton-client v0.7.1)

Linux 5.15.74.2-microsoft-standard-WSL2 #1 SMP Wed Nov 2 19:50:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal

Running Ubuntu in WSL

StevenWegner avatar Nov 30 '22 17:11 StevenWegner