Used with prerender spa plugin returns 400 error
See original GitHub issueHello, I’m using a prerendering plugin (prerender spa plugin). I got this error in console :
GET https://www.google.com/recaptcha/api/fallback?k=6Ld3CSMUAAAAANACpzW7Eef98DqcasUKWmMDrRjk&hl=en&v=r20170524165316&t=1&ff=true 400 ()
The network inspector returns :
Please enable JavaScript to get a reCAPTCHA challenge.
This seems not to work when prerendering. Is there any way to make it work ? Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
prerender-spa-plugin not working on the server - Stack Overflow
I'm trying to run build on the server. But with prerendering, the following error occurs. On desktop ...
Read more >Pre-Render A Vue.js App (With Node Or Laravel)
Firstly we need to add prerender-spa-plugin to our webpack config. Make sure it comes after html-webpack-plugin .
Read more >Pre-Render a Vue.js App (With Node Or Laravel) - DZone
We now need to use prerender-spa-plugin in our webpack config to perform the pre-rendering. Make sure it comes after html-webpack-plugin . var ...
Read more >vue预渲染之prerender-spa-plugin解析(二) - CSDN博客
const PrerendererInstance = new Prerenderer(this._options) PrerendererInstance.initialize() .then(() => { return PrerendererInstance.
Read more >prerender-spa-wp5-plugin - npm
Dynamic Content - If your render routes that have content that's specific to the user viewing it or other dynamic sources, you should...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had a similar issue with prerender-spa-plugin. I recommend you run a quick post-processing on the prerender-spa-plugin output and strip out the recaptcha script tags. Your Vue instance will re-insert them when it takes over from the pre-rendered page. Here is what I used in my prod webpack file:
Ignore the stuff about toasted-vue, that also causes a problem if it renders a toast inside the phantomjs prerender. You will need to install cheerio (npm --save install cheerio ).
You may also find that setting navigationLocked=true seems to fix the recaptcha most of the time…
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.