reCAPTCHA Unexpected token in JSON at position 0

We also faced the same issue on 11/5. For quick fix, we have embedded recapcha in iframe. It was getting block by ajax4jsf/framework.pack.js


We had the same problem, then identified that the issue was a conflict caused by another minified js file loaded on the same page.

We trimmed down what js was loaded on the page down to a bare minimum, eliminating the collision, and now it works fine again.


If you are using Prototype.js:

The Prototype JS library overrides the method reduce in the class Array.

The issue is resolved if you just add the following script after all imports (preferentially after the body tag):

Array.prototype.reduce = function(callback, initialVal) {
    var accumulator = (initialVal === undefined) ? undefined : initialVal;
    for (var i = 0; i < this.length; i++) {
        if (accumulator !== undefined)
            accumulator = callback.call(undefined, accumulator, this[i], i, this);
        else
            accumulator = this[i];
    }
    return accumulator;
};