Skip to content
New issue

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

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

Already on GitHub? # to your account

oauth2/google: invalid token JSON from metadata: EOF #634

Open
kzos opened this issue Apr 30, 2024 · 4 comments
Open

oauth2/google: invalid token JSON from metadata: EOF #634

kzos opened this issue Apr 30, 2024 · 4 comments

Comments

@kzos
Copy link

kzos commented Apr 30, 2024

  1. I am getting below error ,
    when i tried to apply terraform following readme on url
    ==========================================
    Error: Error when reading or editing Project "reasearchdeployment": Get "https://cloudresourcemanager.googleapis.com/v1/projects/reasearchdeployment?alt=json&prettyPrint=false": oauth2/google: invalid token JSON from metadata: EOF

    │ with data.google_project.project,
    │ on main.tf line 27, in data "google_project" "project":
    │ 27: data "google_project" "project" {

  1. Below are the service list , please advise what all needs to be enabled.

gcloud services list | grep api
NAME: analyticshub.googleapis.com
NAME: bigquery.googleapis.com
NAME: bigqueryconnection.googleapis.com
NAME: bigquerydatapolicy.googleapis.com
NAME: bigquerymigration.googleapis.com
NAME: bigqueryreservation.googleapis.com
NAME: bigquerystorage.googleapis.com
NAME: cloudapis.googleapis.com
NAME: cloudtrace.googleapis.com
NAME: dataform.googleapis.com
NAME: dataplex.googleapis.com
NAME: datastore.googleapis.com
NAME: logging.googleapis.com
NAME: monitoring.googleapis.com
NAME: servicemanagement.googleapis.com
NAME: serviceusage.googleapis.com
NAME: sql-component.googleapis.com
NAME: storage-api.googleapis.com
NAME: storage-component.googleapis.com
NAME: storage.googleapis.com

Note: I am already owner of the project and i guess I enabled oauth( but please let me know how to check this).

image

@kzos
Copy link
Author

kzos commented Apr 30, 2024

workloads_tfvars.txt
fyr:-> this is the file i used.

@roberthbailey
Copy link
Collaborator

It looks like you are installing the ray application - is that correct?

Did you do step 3 in https://github.com/GoogleCloudPlatform/ai-on-gke/tree/main/applications/ray?

gcloud auth application-default login

The error you are getting looks like an authentication error.

@kzos
Copy link
Author

kzos commented May 1, 2024

yes , I ran that, do i need to enable any oauth API's?

@roberthbailey
Copy link
Collaborator

You should not need to enable any APIs to authenticate. If you run gcloud auth application-default print-access-token do you get a valid token as output?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants