gauteh / lieer

Fast email-fetching, sending, and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
555 stars 62 forks source link

Can't sync because can't auth due to timeout #285

Closed kode54 closed 3 months ago

kode54 commented 3 months ago

Syncing suddenly requires re-auth, and re-auth fails after passing through the web interface. The web interface successfully loads localhost:8080 and displays the notice about closing the browser, but then Python hangs. Hitting SIGINT produces this backtrace:

Traceback (most recent call last):
  File "/usr/bin/gmi", line 24, in <module>
    g.main ()
  File "/usr/lib/python3.12/site-packages/lieer/gmailieer.py", line 419, in main
    args.func(args)
  File "/usr/lib/python3.12/site-packages/lieer/gmailieer.py", line 499, in sync
    self.remote.get_labels()
  File "/usr/lib/python3.12/site-packages/lieer/remote.py", line 140, in func_wrap
    self.authorize()
  File "/usr/lib/python3.12/site-packages/lieer/remote.py", line 497, in authorize
    self.credentials = self.__get_credentials__()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/lieer/remote.py", line 580, in __get_credentials__
    credentials = flow.run_local_server()
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/google_auth_oauthlib/flow.py", line 458, in run_local_server
    self.fetch_token(
  File "/usr/lib/python3.12/site-packages/google_auth_oauthlib/flow.py", line 285, in fetch_token
    return self.oauth2session.fetch_token(self.client_config["token_uri"], **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/requests_oauthlib/oauth2_session.py", line 341, in fetch_token
    r = self.request(
        ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/requests_oauthlib/oauth2_session.py", line 521, in request
    return super(OAuth2Session, self).request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1060, in _validate_conn
    conn.connect()
  File "/usr/lib/python3.12/site-packages/urllib3/connection.py", line 363, in connect
    self.sock = conn = self._new_conn()
                       ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
kode54 commented 3 months ago

Maybe disregard this, it seems my IPv6 connectivity has gone dead, hopefully only needing a reset.

kode54 commented 3 months ago

Yeah, disregard, sorry. I didn't realize my machine's IPv6 wasn't working, even though my network's was. Resolved.