Recaptcha: Uncaught TypeError: grecaptcha.render is not a function

Created on 4 May 2018  路  1Comment  路  Source: google/recaptcha

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

Most helpful comment

This issue was resolved by not calling render until the onloadcallback triggered.

>All comments

This issue was resolved by not calling render until the onloadcallback triggered.

Was this page helpful?
0 / 5 - 0 ratings