reCaptcha
reCaptcha copied to clipboard
"Invisible" reCaptcha no longer works (prototype 1.7.0)
Hi,
I am running Magento CE 1.9.4.5 and as of about 17/06/2021 the "invisible" reCaptcha no longer works on my website. It does not appear in the bottom right (as configured), and attempting to log in to the backend with a known good username/password combination just results in an error, as if the reCaptcha part is missing.
When the reCaptcha is set to "Invisible", I get the following error in my browser web console:
Uncaught (in promise) TypeError: this.each is not a function
findAll https://www.magento-website.com/js/prototype/prototype.js:883
V https://www.gstatic.com/recaptcha/releases/FDTCuNjXhn1sV0lk31aK53uB/recaptcha__en_gb.js:175
render https://www.gstatic.com/recaptcha/releases/FDTCuNjXhn1sV0lk31aK53uB/recaptcha__en_gb.js:683
e https://www.gstatic.com/recaptcha/releases/FDTCuNjXhn1sV0lk31aK53uB/recaptcha__en_gb.js:195
V https://www.gstatic.com/recaptcha/releases/FDTCuNjXhn1sV0lk31aK53uB/recaptcha__en_gb.js:152
h https://www.gstatic.com/recaptcha/releases/FDTCuNjXhn1sV0lk31aK53uB/recaptcha__en_gb.js:62
nM https://www.gstatic.com/recaptcha/releases/FDTCuNjXhn1sV0lk31aK53uB/recaptcha__en_gb.js:438
h https://www.gstatic.com/recaptcha/releases/FDTCuNjXhn1sV0lk31aK53uB/recaptcha__en_gb.js:115
bind https://www.magento-website.com/js/prototype/prototype.js:391
reCaptchaCallback https://www.magento-website.com/index.php/admin/index/index/key/08be8904c12af90cc2b7cc0c4a7d8a09/:57
each https://www.magento-website.com/js/prototype/prototype.js:825
each https://www.magento-website.com/js/prototype/prototype.js:824
reCaptchaCallback https://www.magento-website.com/index.php/admin/index/index/key/08be8904c12af90cc2b7cc0c4a7d8a09/:50
prototype.js:883:10
Changing the reCaptcha to "I am not a robot" eliminates the above error, and the user can log in - with the visual "I am not a robot" click required.
I have experienced the same behaviour on a development Magento website which has not been changed in over a year, so I'm convinced that something is no longer playing nicely together.
Anyone else experienced this?
Yes, Iam getting very same error message. I can not figure out so far what is going on.
Same thing:
==> recapctha.log <==
2021-06-21T13:13:12+00:00 DEBUG (7): Form ID: backend_login=>No 'g-recaptcha-response' in request! - building
2021-06-21T13:13:12+00:00 DEBUG (7): Form ID: backend_login=>sending to verify params of Array
(
[privatekey] =>
[challenge] =>
[response] =>
)
2021-06-21T13:13:12+00:00 DEBUG (7): Form ID: backend_login=>Bad response from captcha gateway. we got 404
2021-06-21T13:13:12+00:00 DEBUG (7): Form ID: backend_login=>Exception fail : Bad response from captcha gateway. we got 404
Also it is impossible to login from admin backend:
In the short term you can disable the module in etc/modules/ProxiBlue_Recaptcha.xml
which will make Magento fall back to the built in CAPTCHA, log in, re-enable it, and then whilst logged in change it to “I’m not a robot”, or disable CAPTCHAs entirely.
Hello, I will ave a look into this soon, thanks for reporting.
Did any of you update the module recently? can you check versions installed please.
latest is 2.5.0
FWIW, checked a few of the site I know uses this, and seems to be working there:
However, they are not running the latest
"proxiblue/recaptcha": "2.3.8", "proxiblue/recaptcha": "2.3.10", "proxiblue/recaptcha": "2.1.4",
So could be an issue on latest version.
Is this all admin/backend related?
I am not seeing issue on frontend with latest
- Updating proxiblue/recaptcha (2.3.8 => 2.5.0): Loading from cache
I tested it on the following versions and unfortunately it doesn't work: 2.1.1, 2.5.0
I am also fine on backend:
@indrisepos
Magento version?
I'm on the latest currently, per config.xml - 2.5.0
I'm seeing the same web console error on both backend and frontend, when trying to use "Invisible" CAPTCHA type.
Magetno 1.9.4.2
-
-
- 18:15 keltezéssel, Lucas van Staden írta:
-
@indrisepos https://github.com/indrisepos
Magento version?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ProxiBlue/reCaptcha/issues/56#issuecomment-865167400, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTRWGVRTIZ5NHQ2JIBL673TT5QSRANCNFSM47BMDHDQ.
anyone have a site that I can have a look at? obviously a test / uat site is prefered.
I cannot reproduce.
I am on latest openmage, so will get a standard Magetno 1.9.4.2 setup to see.
I have 2.0.1 and its not working.
I can confirm that the same bug exists in 2.3.10, 2.4.0, 2.4.1 and 2.5.0. The same error is produced in the web console when using "Invisible" reCaptcha type. I get the error - and failure of reCaptcha - on backend and frontend.
The fact that it spontaneously stopped working on or around 17/06 makes me think the problem is external.. something relied upon that is no longer the case? Parameter(s) changed, etc?
@ProxiBlue do those versions you are testing have a newer Prototype version? I am on 1.7 according to js/prototype/prototype.js
Ok I've made progress...
Replacing js/prototype/prototype.js
with 1.7.3 immediately fixes the problem with no other changes.
I don't know what if any compatibility issues there are with Magento 1.9+ using Prototype 1.7.3 instead of 1.7....
EDIT: OpenMage ships with 1.7.3 so I'm inclined to think it might be ok. Not sure how you'd debug this one @ProxiBlue - it seems the problem is localised to Prototype which is outside the scope of your module.
{
$this->_debug(ProxiBlue_ReCaptcha_Helper_Data::RECAPTCHA_API_SERVER.'/'.ProxiBlue_ReCaptcha_Helper_Data::RECAPTCHA_API_PATH.'/'.$path);
$httpRequest = new Zend_Http_Client(
ProxiBlue_ReCaptcha_Helper_Data::RECAPTCHA_API_SERVER
. '/'
. ProxiBlue_ReCaptcha_Helper_Data::RECAPTCHA_API_PATH
. '/'
. $path
);
$httpRequest->setParameterPost(array_merge(array('remoteip' => $_SERVER['REMOTE_ADDR']), $params));
$response = $httpRequest->request('POST');
if ($response->getStatus() != 200) {
$this->_debug('Bad response from captcha gateway. we got ' . $response->getStatus());
Mage::throwException('Bad response from captcha gateway. we got ' . $response->getStatus());
}
return $response->getBody();
}
gives https://www.google.com//recaptcha/api/verify which gives 404.
gives https://www.google.com//recaptcha/api/verify which gives 404.
I have seen this before, let me check my changelog
The 404 is expected:
https://github.com/ProxiBlue/reCaptcha/issues/46#issuecomment-649207711
It requires POST data
no, I was wrong, a few commenst down:
https://github.com/ProxiBlue/reCaptcha/issues/46#issuecomment-649208100
it should be siteverify not verify
Yeah I was wrong too - it's https://www.google.com/recaptcha/api/siteverify
I don't see the old URL with just "verify" in the source..
app/code/community/ProxiBlue/ReCaptcha/Helper/Data.php: const RECAPTCHA_SITEVERIFY_PATH = "siteverify";
ok, is 1am here now, I need to go get some sleep. I will investigate on a clean m1924 when I wake up again.
It is installed already, will check module in that next.
Sofar all my local tests work fine, no issues
ok, is 1am here now, I need to go get some sleep. I will investigate on a clean m1924 when I wake up again.
It is installed already, will check module in that next.
Sofar all my local tests work fine, no issues
👍
Upgrading prototype.js
to 1.7.3
fixed the problem for me, and hasn't caused any other obvious issues that I've seen. Obviously I can't recommend this as a solution for heavy production sites, but it worked for me.
I suspect if all your local tests are fine you're using OpenMage, which ships with Prototype 1.7.3. Magento 1.9.4.5 and below ships with 1.7.
Ok, so is likely why mine works on openmage, as they upgraded that.
Thanks for that, I will have to check the code and make it backwards compatible, OR, is code on google side with their js that's no longer compatible (which seems likely reason)
Ok, so is likely why mine works on openmage, as they upgraded that.
Thanks for that, I will have to check the code and make it backwards compatible, OR, is code on google side with their js that's no longer compatible (which seems likely reason)
Yes, the fact that it just spontaneously stopped working - and the fact that earlier versions don't work either - point to Google changing something on their end that makes Prototype 1.7 incompatible.
Upgrading
prototype.js
to1.7.3
fixed the problem for me, and hasn't caused any other obvious issues that I've seen. Obviously I can't recommend this as a solution for heavy production sites, but it worked for me.
Confirm. It is working with 1.7.3, however I am not sure if other services are not affected.
EDIT: OpenMage ships with 1.7.3 so I'm inclined to think it might be ok. Not sure how you'd debug this one @ProxiBlue - it seems the problem is localised to Prototype which is outside the scope of your module.
I will still have a gander, see what I can figure out, but yeah, likely not going to be an issue I can solve. Things move on. That's life
For what it's worth. I'm experiencing the login problem with a 3rd party recaptcha extension. My store is on CE 1.9.4.5
Customers see this error on the login page"• The response parameter is invalid or malformed.". On my store, the last successful order where a customer logged in was June 17th. So not sure if this started later in that day or started in the 18th. Fortunately a customer called me the next day to get help login in so that's what tipped me off. Keeping my extension disabled and following this topic. Will certainly be switching to your module hopefully soon.