Timed out waiting for response from authorization server

Open
#412 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start in pydrive2/auth.py at LocalWebserverAuth (around line 301), which calls flow.run_local_server from google_auth_oauthlib; the traceback shows the local WSGI app never received a request and returned None. Reproduce with the sample OAuth snippet on the reported interpreter (3.14t free-threaded build) and check whether the browser callback is blocked or the timeout is too short. Done looks like either a documented workaround, a configurable timeout/host parameter, or a fix that avoids the last_request_uri crash.

Written by the indexing model from the issue text.

Description

awaiting response priority-p1 triage

When trying to authorize the new client:

Traceback (most recent call last):
  File "/home/user/.venv/lib/python3.14t/site-packages/google_auth_oauthlib/flow.py", line 472, in run_local_server
    authorization_response = wsgi_app.last_request_uri.replace(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'replace'

The above exception was the direct cause of the following exception:

  File "/home/user/.venv/lib/python3.14t/site-packages/pydrive2/auth.py", line 135, in _decorated
    self.auth.LocalWebserverAuth()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/user/.venv/lib/python3.14t/site-packages/pydrive2/auth.py", line 301, in LocalWebserverAuth
    credentials = self.flow.run_local_server(
        host=host_name,
    ...<3 lines>...
        **self._authorization_params(),
    )
  File "/home/user/.venv/lib/python3.14t/site-packages/google_auth_oauthlib/flow.py", line 476, in run_local_server
    raise WSGITimeoutError(
        "Timed out waiting for response from authorization server"
    ) from e
google_auth_oauthlib.flow.WSGITimeoutError: Timed out waiting for response from authorization server
Dominant language
Python
Stars
671
Forks
76
Avg merge
17h 55m
Merged PRs (30d)
46

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from iterative/PyDrive2

All issues in iterative/PyDrive2

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.