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

gapps auth command will fail and not show error if call to Oauth.getToken fails #57

Open
AledLewis opened this issue May 4, 2017 · 3 comments

Comments

@AledLewis
Copy link
Contributor

Essentially, I think there's a missing else block around the
credentials.refresh_token = tokens.refresh_token; resolve(credentials);
At auth.js:90.
This masks any issues with communicating with Google (in my case there was a proxy issue). I believe this issue occurs in other places in the project (I deleted my auth and re-authed as I was getting errors running upload/push.

@AledLewis
Copy link
Contributor Author

Happy to write and submit a PR.

@lricoy
Copy link
Collaborator

lricoy commented Nov 29, 2017

Hi @AledLewis PRs are welcome if you could provide more specific steps to reproduce I could try this as well.

@AledLewis
Copy link
Contributor Author

(couldn't reproduce, this is from memory).

Symptom was Uncaught TypeError: Cannot read property 'refresh_token' of undefined

It was some interaction with my proxy on gapps auth that caused getToken to fail. It looks like execution continues to attempt to write to credentials with a probably-undefined tokens object. This then causes the promise to exit and mask the reject (I guess).

Here's a PR to show my fix #76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants