You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues, it hasn't been reported yet
Issue description
Hi,
I'm trying to set integration with github actions (using Identity federation) to deploy cloud function to GCP but I have not idea why I'm getting error : The incoming JSON object does not contain a client_email field
Error:
Error: The incoming JSON object does not contain a client_email field
at JWT.fromJSON (/github/workspace/node_modules/google-auth-library/build/src/auth/jwtclient.js:195:19)
at GoogleAuth._cacheClientFromJSON (/github/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:301:16)
at ReadStream.<anonymous> (/github/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:336:40)
at ReadStream.emit (events.js:412:35)
at ReadStream.emit (domain.js:475:12)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
1 deprecation found: run 'serverless doctor'for more details
If this is happening to you, it could be due to the fact that you might be using a method for authenticating that might not be supported by the google auth library that this plugin is using. In our case we were also using keyless authentication with github actions (with identity federation). Here's the workaround:
Resolve the version of the nested google-auth-library to at least version 7.0 (we went up to the latest version available to date 9.6.3 because the breaking changes seemed inconsequential to us). We are using yarn, so you can do this using package.json resolutions. The github action from google automatically sets environment variables, and the plugin correctly picks them up.
PS: This is unrelated, but might be helpful to somebody. We also had some troubles with the mappings of the attributes. Make sure you have the correct mappings :)
Are you certain it's a bug?
Is the issue caused by a plugin?
Are you using the latest version?
Is there an existing issue for this?
Issue description
Hi,
I'm trying to set integration with github actions (using Identity federation) to deploy cloud function to GCP but I have not idea why I'm getting error : The incoming JSON object does not contain a client_email field
I've set up roles for service account :
gcloud projects add-iam-policy-binding $PROJECT_ID
--member="serviceAccount:$SERVICE_ACCOUNT@$PROJECT_ID.iam.gserviceaccount.com"
--role="roles/cloudfunctions.developer"
gcloud projects add-iam-policy-binding $PROJECT_ID
--member="serviceAccount:$SERVICE_ACCOUNT@$PROJECT_ID.iam.gserviceaccount.com"
--role="roles/iam.serviceAccountUser"
My githubactions pipeline:
Service configuration (serverless.yml) content
Command name and used flags
serverless deploy
Command output
Environment information
The text was updated successfully, but these errors were encountered: