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

Grunt Update Fails and Google Auth Fails #94

Open
Greg-Boggs opened this issue Oct 9, 2021 · 10 comments
Open

Grunt Update Fails and Google Auth Fails #94

Greg-Boggs opened this issue Oct 9, 2021 · 10 comments

Comments

@Greg-Boggs
Copy link

We used the older version of this project to build a "best of books" page. We're trying to update to the current version. We do not need access to private sheets, but the build fails with a fatal error.

When I run grunt update, I get this error:

No access token from ~/.google_oauth_token, private spreadsheets will be unavailable. Error: ENOENT: no such file or directory, open '/Users//.google_oauth_token'

We created a google oauth token and when I put it in the path, I then get this error:

Running "sheets" task
(node:5083) UnhandledPromiseRejectionWarning: Error: No access, refresh token or API key is set.

@thomaswilburn
Copy link
Contributor

How did you create the token? There should be a grunt google-auth task that will log in for you and save it in the correct format.

@Greg-Boggs
Copy link
Author

The google auth command returns an error from Google:

Authorization Error
Error 400: invalid_request
Missing required parameter: client_id

@thomaswilburn
Copy link
Contributor

Ah, that usually means you do not have a client ID set in your environment variables.

In order to authenticate for the OAuth API, you should follow the instructions in this post. If you're not able to do that, you can publish your book workbook to the web and revert the sheets task to the older, unauthenticated version, but that relies on an older API version and isn't guaranteed to work long-term the way the authenticated version will.

@Greg-Boggs
Copy link
Author

Thanks for the replies Thomas. That documentation post is super helpful! I'll give it a try and report back next week.

@Greg-Boggs
Copy link
Author

Just incase you're interested, our Library here in Portland uses the app for a best of books list. We're excited to get updated to your current version for the 2021 list.

http://bestof.multcolib.org/2020/

@Anapsys
Copy link

Anapsys commented Oct 13, 2021

I get the same error detailed here.
Following the blog post and creating .google_oauth_token changes the error to a "Error: No access, refresh token or API key is set." on grunt update. Setting the environment variables changes nothing.

@thomaswilburn
Copy link
Contributor

Did you create the token manually, or using the grunt google-auth task? If you create it manually, it probably won't be in the correct format for our authentication process.

@Anapsys
Copy link

Anapsys commented Oct 13, 2021

i cannot use the grunt google-auth command; on launch, it creates the Error 400: invalid request mentioned above.

@Anapsys
Copy link

Anapsys commented Oct 14, 2021

I've since gotten it working. There seems to currently be some issue executing commands to set the environment variables (in windows 10 at least), even from the cloud sdk shell. In the end, I needed to manually add all the environment variables, which then worked on reload.

@Charlotte885
Copy link

Hi, i am using debian but i receive Grunt Update Fails and Google Auth Fails. i have put the clientID on .bashrc.

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

No branches or pull requests

4 participants