Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigQuery: Flaky RefreshError: 'invalid_grant: Invalid JWT: No valid verifier found for issuer.' #6375

Closed
bencaine1 opened this issue Nov 2, 2018 · 1 comment
Assignees
Labels
api: bigquery Issues related to the BigQuery API. auth

Comments

@bencaine1
Copy link

OS: Linux dc32b7e8763a 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 x86_64 x86_64 GNU/Linux
Python version: Python 2.7.6
google-cloud-bigquery: 1.5.0

When trying to do a query, we got the following flaky error (retrying solved the problem):

  File "/usr/local/lib/python2.7/dist-packages/google/cloud/bigquery/client.py", line 1232, in query
    query_job._begin(retry=retry)
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/bigquery/job.py", line 543, in _begin
    method='POST', path=path, data=self._build_resource())
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/bigquery/client.py", line 331, in _call_api
    return call()
  File "/usr/local/lib/python2.7/dist-packages/google/api_core/retry.py", line 260, in retry_wrapped_func
    on_error=on_error,
  File "/usr/local/lib/python2.7/dist-packages/google/api_core/retry.py", line 177, in retry_target
    return target()
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/_http.py", line 290, in api_request
    headers=headers, target_object=_target_object)
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/_http.py", line 183, in _make_request
    return self._do_request(method, url, headers, data, target_object)
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/_http.py", line 212, in _do_request
    url=url, method=method, headers=headers, data=data)
  File "/usr/local/lib/python2.7/dist-packages/google/auth/transport/requests.py", line 198, in request
    self._auth_request, method, url, request_headers)
  File "/usr/local/lib/python2.7/dist-packages/google/auth/credentials.py", line 121, in before_request
    self.refresh(request)
  File "/usr/local/lib/python2.7/dist-packages/google/oauth2/service_account.py", line 322, in refresh
    request, self._token_uri, assertion)
  File "/usr/local/lib/python2.7/dist-packages/google/oauth2/_client.py", line 145, in jwt_grant
    response_data = _token_endpoint_request(request, token_uri, body)
  File "/usr/local/lib/python2.7/dist-packages/google/oauth2/_client.py", line 111, in _token_endpoint_request
    _handle_error_response(response_body)
  File "/usr/local/lib/python2.7/dist-packages/google/oauth2/_client.py", line 61, in _handle_error_response
    error_details, response_body)
RefreshError: ('invalid_grant: Invalid JWT: No valid verifier found for issuer.', u'{\n  "error" : "invalid_grant",\n  "error_description" : "Invalid JWT: No valid verifier found for issuer."\n}')

Would it be possible to add RefreshError to the list of retryable exceptions?

@tseaver tseaver added api: bigquery Issues related to the BigQuery API. auth labels Nov 2, 2018
@tseaver
Copy link
Contributor

tseaver commented Nov 2, 2018

@bencaine1 I think retry of a credentials request should be handled by the google-auth library. Please file the issue against its tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. auth
Projects
None yet
Development

No branches or pull requests

2 participants