Google reCaptcha keeps loading forever

17,753

Solution 1

Actually I found the answer. The captcha was loading inside a modal popup div. When this popup loaded, it would change the div's parent and that somehow broke the captcha (probably some embedded security code). My solution was to reload the captcha after the window popup.

Solution 2

your problem is:

<div class="g-recaptcha" data-theme="light"></div>

you are missing attribute. the correct will be:

<script src='https://www.google.com/recaptcha/api.js'></script>
<div class="g-recaptcha" data-sitekey="your_google_public_key"></div>

You hav create data-sitekey before use google captcha.

read more at https://developers.google.com/recaptcha/docs/display and https://www.google.com/recaptcha/admin#createsite

Share:
17,753
sigmaxf
Author by

sigmaxf

Updated on July 20, 2022

Comments

  • sigmaxf
    sigmaxf almost 2 years

    I'm using Google's reCaptcha 2.0 on my website. It used to work well, but since I opened my website to the public and got some more users, recaptcha is not working anymore with most users.. it loads fine, but once the user clicks the "I'm not a robot" checkbox, it keeps loading eternally and never returns a confirmation.

    I tried to look all over the web for it, but couldn't find someone with a similar issue, and I have no idea how to (or if I can) debug it, since apparently it's not returning a response from google. All my keys are correct.

    Can someone help me out? My website is www.heropanel.com - to simulate it, click on contact at the bottom of the page, and click the "I'm not a robot" checkbox.