google / recaptcha

PHP client library for reCAPTCHA, a free service to protect your website from spam and abuse.
http://www.google.com/recaptcha/
BSD 3-Clause "New" or "Revised" License
3.48k stars 772 forks source link

Unknown base64 encoding in racaptcha_en.js #392

Open edwolfe3 opened 4 years ago

edwolfe3 commented 4 years ago

I'm getting an Unknown base64 encoding at char (the char shown varies) while using the following code:


grecaptcha.ready(function() {
    grecaptcha.execute(<valid_key>, {action: <action_string}).then(function(token) {
        ...
    });
});

This worked up until this week. What do I need to fix it?

edwolfe3 commented 4 years ago

Nobody getting the same error?

cchamberlain commented 4 years ago

I'm seeing this in Firefox and the timing of the issue report correlates to some major CSS issues that showed up on our site in the past week.

image

image

For us I believe this is occurring in an iframe which is explicitly different origin than the main frame for sandbox purposes. There is not much I can think to do other than disable recaptcha since the call stack originates in the recaptcha script:

image

edwolfe3 commented 4 years ago

I'm getting the exact same thing, but I am not using iframes nor do i have a anything from different origins. When I first activated recaptcha, I didn't have any issues. It started after a week or so using it.

rikvanmechelen commented 4 years ago

We're seeing the same issue. @edwolfe3 did you get it resolved, or did you stop using recaptcha?

edwolfe3 commented 4 years ago

Unfortunately, no.

bigs commented 4 years ago

I'm experiencing this issue as well. We're using reCAPTCHA v2 in "invisible" mode. The error does not occur on the latest Chrome (on Ubuntu 18.0x), but is a show-stopper in Firefox for me.

awesomizer commented 4 years ago

Same sad experience.

SandorDobos commented 3 years ago

Same here.

devbikash07 commented 3 years ago

image

SandorDobos commented 3 years ago

hi i am not sure but it looks like installing "Enable jQuery Migrate
Helper" to my WP site suffering this problem solved it. regards, s ----- Message from JoppeDC notifications@github.com --------- Date: Tue, 01 Dec 2020 00:47:31 -0800 From: JoppeDC notifications@github.com Reply-To: google/recaptcha
reply@reply.github.com Subject: Re: [google/recaptcha] Unknown base64 encoding in
racaptcha_en.js (#392) To: google/recaptcha recaptcha@noreply.github.com Cc: SandorDobos dbs.sndr@gmail.com, Comment
comment@noreply.github.com

Safari is working for me, but chrome (86.0.4240.198) is not working.
Same issue on the JS file. Did anyone figure out a solution?

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/google/recaptcha/issues/392#issuecomment-736318130

----- End message from JoppeDC notifications@github.com -----

-- Dobos Sándor

mfrancesw commented 2 years ago

Hi, joined just to reply to this, one of the few threads that google returns for this error.

The problem was a mismatch between the call to onSubmit(token) and the id of the webform containing the invisible captcha.

function onSubmit(token) { document.getElementById("mywebform").submit(); }

mywebform better be the right id. Copy and pasted and had a different form id than was in the header. Hope this helps someone else. Took me down a rabbit hole of content security policy that had no bearing on the issue.