Y
Y
YakutD2020-06-01 13:08:49
JavaScript
YakutD, 2020-06-01 13:08:49

Why does recaptcha give an anchor:1 Uncaught (in promise) error?

Hello, I was developing a site on a local server with a built-in google chrome browser version 68.0.3440.106 . The forms have v2 recaptcha attached, but on more modern versions of the same browser I get an Uncaught (in promise) null error at anchor:1 . I don't understand what is the problem and how to solve it.

Here is the captcha code:

"use strict";
    var idCaptcha1;
var onloadReCaptchaInvisible = function () {
    try {
        //login
        idCaptcha1 = grecaptcha.render('recaptcha1', {
            "sitekey": "mycaptchakey",
            "callback": "onSubmitReCaptcha1",
            "size": "invisible"
        });
    } catch (e) {
        console.log(e);
    }
}

function onSubmitReCaptcha1(token) {
    sendForm('signin', idCaptcha1);
}


Again, sending works if I open the same site from under the old Chrome. The current version of the browser does not cope for some reason .__.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question