-
Notifications
You must be signed in to change notification settings - Fork 154
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
google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', '{\n "error": "invalid_grant",\n "error_description": "Bad Request"\n}') #341
Comments
@rabeehk I think this problem is related to credential file. Please go through the auth documentation to generate the credentials file for login.
OR Please do the following steps to verify the login with gcloud:
|
Hi @rabeehk, Thanks for filing the issue. |
Hi @rabeehk, Are you still experiencing this issue? |
I am getting the same error with the Google Calendar API @frankyn |
Closing due to lack of response and open duplicate issues #17 and googleapis/google-auth-library-python#261 @polmv123 this library does not cover the calendar API. |
using Service acount will prevent this from happening ? |
Hi, I had the same issue and I've fixed it by running
|
I am too getting similar following issue, while using GCS on local, although working fine when running from the online google console or when when I deploy the service: raise exceptions.RefreshError( I already did the gcloud auth application-default login, and authenticated. |
Hi
I am trying with
import os
from google.cloud import storage
os.environ["GCLOUD_PROJECT"]=project-name
file_path = 'outputs/mixture1/meta-adapter/task-emb/mix1-meta-task-emb-new-lr-3e-03/eval_results.json'
storage_client = storage.Client()
bucket = storage_client.get_bucket(bucket-name)
and I get
Traceback (most recent call last):
File "test.py", line 19, in
bucket = storage_client.get_bucket("gs://ruse-xcloud-bucket")
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/cloud/storage/client.py", line 361, in get_bucket
if_metageneration_not_match=if_metageneration_not_match,
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/cloud/storage/bucket.py", line 936, in reload
if_metageneration_not_match=if_metageneration_not_match,
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/cloud/storage/_helpers.py", line 210, in reload
retry=DEFAULT_RETRY,
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/cloud/storage/_http.py", line 63, in api_request
return call()
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/api_core/retry.py", line 286, in retry_wrapped_func
on_error=on_error,
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/api_core/retry.py", line 184, in retry_target
return target()
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/cloud/_http.py", line 434, in api_request
timeout=timeout,
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/cloud/_http.py", line 292, in _make_request
method, url, headers, data, target_object, timeout=timeout
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/cloud/_http.py", line 330, in _do_request
url=url, method=method, headers=headers, data=data, timeout=timeout
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/auth/transport/requests.py", line 460, in request
self.credentials.before_request(auth_request, method, url, request_headers)
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/auth/credentials.py", line 133, in before_request
self.refresh(request)
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/oauth2/credentials.py", line 206, in refresh
self._scopes,
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/oauth2/_client.py", line 248, in refresh_grant
response_data = _token_endpoint_request(request, token_uri, body)
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/oauth2/_client.py", line 124, in _token_endpoint_request
_handle_error_response(response_body)
File "/usr/local/google/home/rabeeh/anaconda3/envs/internship/lib/python3.7/site-packages/google/oauth2/_client.py", line 60, in _handle_error_response
raise exceptions.RefreshError(error_details, response_body)
google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', '{\n "error": "invalid_grant",\n "error_description": "Bad Request"\n}')
thanks
The text was updated successfully, but these errors were encountered: