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

Auth Issue During Build #19

Open
rotexhawk opened this issue Nov 20, 2018 · 5 comments
Open

Auth Issue During Build #19

rotexhawk opened this issue Nov 20, 2018 · 5 comments

Comments

@rotexhawk
Copy link

I added gatsby-guess-js and during development build it asked for permission and authorized it through my google account. The problem is that during build step it get's stuck at the last step. I am also getting this warning. Ran into the same issue while deploying to netlify.

Stuck Here.
Building production JavaScript and CSS bundles

(node:42954) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead

@rotexhawk rotexhawk reopened this Nov 20, 2018
@rotexhawk rotexhawk changed the title Permission Issue During Build Auth Issue During Build Nov 20, 2018
@mgechev
Copy link
Member

mgechev commented Nov 20, 2018

It's likely that we're hitting this issue guess-js/guess#67.

Which Gatsby Guess.js plugin did you try? Also, keep in mind this issue gatsbyjs/gatsby#9572.

@rotexhawk
Copy link
Author

Using "gatsby-plugin-guess-js": "^1.0.2" Probably not the first issues because in total I have tried building 4 - 5 times and even after it failed in netlify it passed locally. During netlify build I don't get the window asking me to login to my google account, which is probably why it get's stuck in that phase.

@mgechev
Copy link
Member

mgechev commented Nov 20, 2018

Then you should provide JWT for authentication. This is not well documented yet, unfortunately. I believe the Gatsby plugin will let you set this property. Here is how you can get the token http://2ality.com/2015/10/google-analytics-api.html.

@travis-r6s
Copy link

travis-r6s commented Jun 13, 2019

I'm having a similar issue - I am using the JWT option, which builds fine locally. But when I add the private key to Netlify, the build fails - Error: error:0906D06C:PEM routines:PEM_read_bio:no start line

Managed to solve this by base64 encoding the key, then decoding in JS at build time.

@omonk
Copy link

omonk commented Jul 22, 2019

@mgechev I've created a PR to add this to the documentation: gatsbyjs/gatsby#15969

Are there any examples we can add to the documentation for the JWT generation instead of the link you've referenced to 2ality?

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