python-eduvpn-client icon indicating copy to clipboard operation
python-eduvpn-client copied to clipboard

No GUI feedback on connection issues

Open gijzelaerr opened this issue 2 years ago • 1 comments

I'm trying to use the eduvpn client (upgrades branch) with poor internet and I'm experiencing a couple of issues. First, it takes a while to download the initial json files, while the UI is usable. If I then search nothing happens, not results pop up. This is confusing, since there is no way too tell if there are no matches or no potential results at all yet.

If the connection eventually times out I only get an error in the terminal, not in the UI. Log:

./venv/bin/eduvpn-gui
2021-12-15 08:24:02,845 - init-server-db - INFO - eduvpn.remote - remote.py:23 - Requesting https://disco.eduvpn.org/v2/server_list.json
2021-12-15 08:24:17,967 - init-server-db - ERROR - eduvpn.remote - remote.py:76 - Got exception HTTPSConnectionPool(host='disco.eduvpn.org', port=443): Max retries exceeded with url: /v2/server_list.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xffffb17ebfa0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')) requesting https://disco.eduvpn.org/v2/server_list.json for server_list
Exception in thread init-server-db:
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 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

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 0xffffb17ebfa0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

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='disco.eduvpn.org', port=443): Max retries exceeded with url: /v2/server_list.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xffffb17ebfa0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/parallels/Work/surfnet/python-eduvpn-client/eduvpn/app.py", line 81, in initialize_server_db
    self.server_db.update()
  File "/home/parallels/Work/surfnet/python-eduvpn-client/eduvpn/server.py", line 279, in update
    server_list = remote.list_servers(SERVER_URI)
  File "/home/parallels/Work/surfnet/python-eduvpn-client/eduvpn/remote.py", line 74, in list_servers
    result = request(uri, verify=True)['server_list']
  File "/home/parallels/Work/surfnet/python-eduvpn-client/eduvpn/remote.py", line 25, in request
    response = requests.get(uri)
  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)
```

gijzelaerr avatar Dec 15 '21 06:12 gijzelaerr