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

Not containing client_email field #298

Open
HarukiKinoshita opened this issue Oct 11, 2021 · 2 comments
Open

Not containing client_email field #298

HarukiKinoshita opened this issue Oct 11, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@HarukiKinoshita
Copy link

Context (Environment)

When starting the local server with npm run watch I got the message saying not containing client_email field. I guess this has to do with Google OAuth.
Am I the only one struggling with this error?

v1.4.1
Node: v15.8.0

Expected Behavior

(local server running correctly)

Actual Behavior

debug: updating tree...
warn: failed updating tree 
{
   message: 'The incoming JSON object does not contain a client_email field',
   stack: 'Error: The incoming JSON object does not contain a client_email field\n' +
     '    at JWT.fromJSON (/Users/kinoshitaharuki/dev/library/node_modules/google-auth-library/build/src/auth/jwtclient.js:195:19)\n' +
     '    at GoogleAuth._cacheClientFromJSON (/Users/kinoshitaharuki/dev/library/node_modules/google-auth-library/build/src/auth/googleauth.js:301:16)\n' +
     '    at ReadStream.<anonymous> (/Users/kinoshitaharuki/dev/library/node_modules/google-auth-library/build/src/auth/googleauth.js:336:40)\n' +
     '    at ReadStream.emit (node:events:378:20)\n' +
     '    at endReadableNT (node:internal/streams/readable:1307:12)\n' +
     '    at processTicksAndRejections (node:internal/process/task_queues:81:21)'
}
@HarukiKinoshita HarukiKinoshita added the bug Something isn't working label Oct 11, 2021
@afischer
Copy link
Member

Hi @HarukiKinoshita, would you mind sharing the names of the environment variables you have set in your .env? (Please don't send over the values, those are private!) It seems like something might be slightly misconfigured.

@HarukiKinoshita
Copy link
Author

HarukiKinoshita commented Oct 29, 2021

Hello @afischer, I've just sorted out the problem! I mistakenly put OAuth credentials, not the service account credentials, into .auth.json. Sorry for that.

Just one more thing... Heroku builds successfully, but it gets an application error when visiting the application URL. It happens when deploying from my GitHub repo / directly from Heroku CLI. It didn't happen in the initial deploy (from Deploy to Heroku button). Do you have any thoughts?
Ugh... Fixed it. Must have something to do with npm version difference (specify npm 6.x instead of >=6.5.x)

heroku logs --tail
~~~~~~~~~~
2021-10-29T08:24:37.343147+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my_heroku_app_name.herokuapp.com request_id=3b2c2052-d456-4674-bbcd-66c6458a14d3 fwd="138.64.64.138" dyno= connect= service= status=503 bytes= protocol=https

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants