Search code examples
phpjsonrecaptchaunexpected-token

reCaptcha v2 "I'm not a Robot" suddenly broken, not getting 'g-recaptcha-response'


Recaptcha v2 has been running on my site for several years. Suddenly on Friday, November 6th I no longer received 'g-recaptcha-response' and began to see the following error:

recaptcha__en.js:24 Uncaught (in promise) SyntaxError: Unexpected token m in JSON at position 0
at JSON.parse (<anonymous>)
at recaptcha__en.js:24
at recaptcha__en.js:45
at Array.<anonymous> (recaptcha__en.js:307)
at Array.<anonymous> (recaptcha__en.js:44)
at js.$ (recaptcha__en.js:23)
at Array.<anonymous> (recaptcha__en.js:195)
at zO.g.next (recaptcha__en.js:370)
at P (recaptcha__en.js:41)

Any help to resolve this issue would be much appreciated


Solution

  • Note: This issue appeared on its own and no code changes made when this broke.

    I ended up resolving the issue. The issue was a conflicting script tag. I removed the script tag from the login page and it resolved the issues.

    For my case it was prototype.js that was the issue.

    good luck!