3

I have installed Magento officially released Google reCAPTCHA it's working fine, But when I browse directly two customer account creation page https://example.com/customer/account/create/ captcha is not loading for the first time if I refresh it's loading fine.

Console log ERROR:

enter image description here

reCaptcha.js:127 Uncaught TypeError: grecaptcha.render is not a function
    at UiClass.initCaptcha (reCaptcha.js:127)
    at reCaptcha.js:175

/vendor/msp/recaptcha/view/frontend/web/js/reCaptcha.js

Tried below link but no luck

https://stackoverflow.com/a/50224757/8237294

1 Answer 1

0

Try to find file ./view/frontend/web/js/reCaptcha.js in you project and change code:

            renderReCaptcha: function () {
                var me = this;

                if (this.getIsVisible()) {
                    var initCaptchaInterval = setInterval(function () {
                        if (window.grecaptcha) {
                            clearInterval(initCaptchaInterval);
                            me.initCaptcha();
                        }
                    }, 100);
                }
            },

set

if (window.grecaptcha && window.grecaptcha.render ) {...}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.