Uncaught TypeError: grecaptcha.render is not a function. I'm getting this error intermittently when loading invisible recaptcha on my site. For reference I have some code checking for when the recaptcha is loaded:
if (!window.grecaptcha) {
return Promise.reject('not ready to render recaptcha yet');
}
const captchaId = window.grecaptcha.render(this.captchaDiv, {
badge: 'inline',
size: 'invisible',
sitekey: INVISIBLE_RECAPTCHA_SITE_KEY,
callback,
});
Is this an issue on Google's end? The issue just started happening
This issue was resolved by not calling render until the onloadcallback triggered.
Most helpful comment
This issue was resolved by not calling
renderuntil theonloadcallbacktriggered.