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

D-bus signal error

Open raeokay opened this issue 3 years ago • 1 comments

Describe the bug Big, icky set of error messages upon connect, which then hangs the terminal until I manually escape it. It doesn't appear to affect the connection, but it happens almost every time I connect to a server.

The initial error is on D-bus signal in connection.py, and then it cascades to a bunch of other Python errors.

To Reproduce Steps to reproduce the behavior: Initialize any connection. I've found a roughly 80% chance that the errors will display, with the other ~20% being a nice little Connected! message.

Expected behavior Not a bunch of errors. Connect, report the connection, and drop back to bash input.

Error Messages/Program Output/Log Messages (~/.pvpn-cli/pvpn-cli.log) I can't find the actual logs anywhere, which is weird. Here's what's in the terminal:

Adding ProtonVPN connection... ProtonVPN connection was successfully added to Network Manager. Connecting to ProtonVPN on US-NY#9 with UDP... Attemping to fetch IP... ERROR:dbus.connection:Exception in handler for D-Bus signal: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw) File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 80, in create_connection raise err File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 70, in create_connection sock.connect(sa) socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 343, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/proton/cert_pinning.py", line 95, in _validate_conn r = super(TLSPinningHTTPSConnectionPool, self)._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 841, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 301, in connect conn = self._new_conn() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 164, in _new_conn (self.host, self.timeout)) urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.VerifiedHTTPSConnection object at 0x7f38d71c44a8>, 'Connection to api.protonvpn.ch timed out. (connect timeout=10)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: TLSPinningHTTPSConnectionPool(host='api.protonvpn.ch', port=443): Max retries exceeded with url: /vpn/loads (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f38d71c44a8>, 'Connection to api.protonvpn.ch timed out. (connect timeout=10)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/services/proton_session_wrapper.py", line 426, in call_api_method *args, **api_kwargs File "/usr/lib/python3/dist-packages/proton/api.py", line 108, in api_request timeout=self.__timeout File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get return self.request('GET', 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 504, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: TLSPinningHTTPSConnectionPool(host='api.protonvpn.ch', port=443): Max retries exceeded with url: /vpn/loads (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f38d71c44a8>, 'Connection to api.protonvpn.ch timed out. (connect timeout=10)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message self._handler(*args, **kwargs) File "/usr/lib/python3/dist-packages/protonvpn_cli/vpn_state_monitor.py", line 57, in on_vpn_state_changed self.session.cache_servers() File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/services/proton_session_wrapper.py", line 126, in cache_servers self.loads_cache() File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/services/proton_session_wrapper.py", line 162, in loads_cache "/vpn/loads" File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/services/proton_session_wrapper.py", line 433, in call_api_method raise exceptions.APITimeoutError(e) protonvpn_nm_lib.exceptions.APITimeoutError: TLSPinningHTTPSConnectionPool(host='api.protonvpn.ch', port=443): Max retries exceeded with url: /vpn/loads (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f38d71c44a8>, 'Connection to api.protonvpn.ch timed out. (connect timeout=10)'))

Desktop (please complete the following information):

  • OS: MX Linux 19.4_ahs_x64
  • Python Version: 3.7.3
  • ProtonVPN-CLI Version: 3.3.1

Additional context This has been occurring for a few months but I figured it was something I'd broken. I just did a fresh OS install today and had hoped this would've been resolved, because I was very cruel to my prior install, but no dice.

raeokay avatar Apr 18 '21 21:04 raeokay

I have basically the same issue, although my stack traces are not exactly the same.

ERROR:dbus.connection:Exception in handler for D-Bus signal:
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)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/proton/cert_pinning.py", line 95, in _validate_conn
    r = super(TLSPinningHTTPSConnectionPool, self)._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 978, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 308, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 164, in _new_conn
    raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x7f25d7e88880>, 'Connection to api.protonvpn.ch timed out. (connect timeout=10)')

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 724, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: TLSPinningHTTPSConnectionPool(host='api.protonvpn.ch', port=443): Max retries exceeded with url: /vpn/logicals (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f25d7e88880>, 'Connection to api.protonvpn.ch timed out. (connect timeout=10)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/services/proton_session_wrapper.py", line 425, in call_api_method
    api_response = self.api_methods[method](
  File "/usr/lib/python3/dist-packages/proton/api.py", line 109, in api_request
    ret = fct(
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 504, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: TLSPinningHTTPSConnectionPool(host='api.protonvpn.ch', port=443): Max retries exceeded with url: /vpn/logicals (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f25d7e88880>, 'Connection to api.protonvpn.ch timed out. (connect timeout=10)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 232, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/protonvpn_cli/vpn_state_monitor.py", line 57, in on_vpn_state_changed
    self.session.cache_servers()
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/services/proton_session_wrapper.py", line 124, in cache_servers
    self.full_cache()
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/services/proton_session_wrapper.py", line 131, in full_cache
    api_response, error = self.call_api_method(
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/services/proton_session_wrapper.py", line 433, in call_api_method
    raise exceptions.APITimeoutError(e)
protonvpn_nm_lib.exceptions.APITimeoutError: TLSPinningHTTPSConnectionPool(host='api.protonvpn.ch', port=443): Max retries exceeded with url: /vpn/logicals (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f25d7e88880>, 'Connection to api.protonvpn.ch timed out. (connect timeout=10)'))

Desktop (please complete the following information):

OS: Pop!_OS 20.10
Python Version: 3.8.6
ProtonVPN-CLI Version: ProtonVPN CLI v3.3.1 (protonvpn-nm-lib v0.4.2; proton-client v0.4.0)

pluralmonad avatar May 06 '21 00:05 pluralmonad