reCAPTCHA "Failed to find surrounding form in validate Repeated Username"

The reCAPTCHA functionality protecting our web forms has started throwing an error. I’ve worked around the problem by disabling reCAPTCHA so that the form still works, but that’s obviously not a viable solution for the long term.

The error originates in the script It seems that an ajax call to /app/form/usernameExists fails.

    function e(e, i, s, t, n) {
        var a = e,
            d = i,
            l = s,
            u = t,
            o = grecaptcha;
            url: "/app/form/usernameExists/" + e,
            success: function(e) {
                var i;
                if (i = e, a && i && (l = !0, r(d, a + " is already in use. Please choose another."), d.classList.add("infusion-field-required")), !l) try {
                } catch (s) {
                    console.error("Failed to find surrounding form.", s)
            error: function(e, i, r) {
                alert("Failed to find surrounding form in validate Repeated Username , Please try again"), console.log("Failed to find surrounding form in validate Repeated Username")
        }), o.reset(n)

From looking elsewhere in the script to see what parameters that function gets called with, it seems that it’s looking for a field inf_other_Username, which is not present. I think this means that it just invokes /app/form/usernameExists/ with a blank, which seems to give me “Error 640”, whatever that means.

Anybody got an idea what to do next?

It’s not really something you can debug without having access to the remote code on Keaps servers.