Recaptcha v3 issue

921 views Asked by At

Suddenly Recaptcha V3 stopped working. I am getting error. Could not connect to the reCAPTCHA service. Please check your internet connection and reload to get a reCAPTCHA challenge..

But internet is fine. On investigation found that https://www.google.com/recaptcha/api2/api2/anchor?ar=1&k=6Lfe5HcUAAAAAGrF4-sXx5YFaoCETFY1qZ6V8pGM&co=aHR0cHM6Ly93d3cuaW50ZXJyYWlsLmV1OjQ0Mw..&hl=en-GB&v=NjbyeWjjFy97MXGZ40KrXu3v&size=invisible&cb=z9bncod50jz9 is throwing 404 error. This gets added by recaptcha js on the page. The strange thing is api2 is twice in the url, if I remove one it returns 200 and loads the recaptcha logo. https://www.google.com/recaptcha/api2/anchor?ar=1&k=6Lfe5HcUAAAAAGrF4-sXx5YFaoCETFY1qZ6V8pGM&co=aHR0cHM6Ly93d3cuaW50ZXJyYWlsLmV1OjQ0Mw..&hl=en-GB&v=NjbyeWjjFy97MXGZ40KrXu3v&size=invisible&cb=z9bncod50jz9

1

There are 1 answers

0
Johannes Metzner On

You might want to check that no 3rd party library or your own JavaScript files are fiddling with String.prototype. Some String methods have been added to the ECMAScript 2015 specification and old scripts are still containing these. Just search for occurrences of String.prototype. At least that fixed it for me.