VividCortex / angular-recaptcha

AngularJS directive to add a reCaptcha widget to your form
http://vividcortex.github.io/angular-recaptcha/
MIT License
496 stars 257 forks source link

recaptcha.render is not a function #224

Closed williambueti closed 6 years ago

williambueti commented 6 years ago

Now that Google is loading a second library for reCaptcha, if the angular-recaptcha library is cached in the browser it loads and tries to render before Google's second library finishes, resulting in: https://www.screencast.com/t/NERK8upzoq

williambueti commented 6 years ago

Network sequence of scripts: https://www.screencast.com/t/OLnZo27pV88

tony-kaplan commented 6 years ago

yeah, I have same issue. I think it is only happens in Firefox

rinconjc commented 6 years ago

Experiencing the same issue!.... Any workaround? anyone?

tony-kaplan commented 6 years ago

I found the solution:

Upgrade to latest version and remove below manual include since version 4.0 they alr auto import the library.

<script src="https://www.google.com/recaptcha/api.js?onload=vcRecaptchaApiLoaded&render=explicit" async defer></script>

muthukrishk commented 6 years ago

@tony-kaplan could you please explain from which line the above include should be removed ? I can see a couple of imports

williambueti commented 6 years ago

So what I believe @tony-kaplan is reffering to is if in your html you include the above line, it should be removed, because the angular-recaptcha library already makes a call to load this.

Please correct me if I'm wrong.

iambrosi commented 6 years ago

@williambueti I just submitted a PR as an attempt to fix this issue. Would you please check if you can reproduce the issue with the code from that PR?

AbdallaANasser commented 6 years ago

I got this error again in version 1.0.4.

TypeError: recaptcha.render is not a function
    at angular-recaptcha.js:199

@iambrosi & @mtrias can we re-open this issue again?

omarcelomadeira commented 6 years ago

Just upgrade the version of plugin and be happy!

japenagoss commented 5 years ago

I found the solution:

Upgrade to latest version and remove below manual include since version 4.0 they alr auto import the library.

<script src="https://www.google.com/recaptcha/api.js?onload=vcRecaptchaApiLoaded&render=explicit" async defer></script>

great solution, thanks