magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

main.ERROR: Magento\Framework\Exception\InputException: Can not resolve reCAPTCHA parameter. in /data/web/public/vendor/magento/module-re-captcha-ui/Model/CaptchaResponseResolver.php:25 #38101

Closed timpea-splat closed 1 year ago

timpea-splat commented 1 year ago

Preconditions and environment

Steps to reproduce

Not found a way to reproduce the error every time.

  1. Configuration > Security > Google ReCaptcha StoreFront
  2. Enable reCaptcha v2 Invisible

We are receiving this error roughly 2-3 times a day. ReCaptcha works correctly when testing with no error.

Expected result

No error

Actual result

Error in exception.log:
[2023-10-19T09:31:16.313374+00:00] main.ERROR: Magento\Framework\Exception\InputException: Can not resolve reCAPTCHA parameter. in /data/web/public/vendor/magento/module-re-captcha-ui/Model/CaptchaResponseResolver.php:25
Stack trace:
#0 /data/web/public/vendor/magento/module-re-captcha-ui/Model/RequestHandler.php(112): Magento\ReCaptchaUi\Model\CaptchaResponseResolver->resolve()
#1 /data/web/public/vendor/magento/module-re-captcha-customer/Observer/CreateCustomerObserver.php(67): Magento\ReCaptchaUi\Model\RequestHandler->execute()
#2 /data/web/public/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Magento\ReCaptchaCustomer\Observer\CreateCustomerObserver->execute()
#3 /data/web/public/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod()
#4 /data/web/public/vendor/magento/framework/Event/Manager.php(65): Magento\Framework\Event\Invoker\InvokerDefault->dispatch()
#5 /data/web/public/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch()
#6 /data/web/public/vendor/magento/framework/App/FrontController.php(279): Magento\Framework\Event\Manager\Proxy->dispatch()
#7 /data/web/public/vendor/magento/framework/App/FrontController.php(211): Magento\Framework\App\FrontController->dispatchPreDispatchEvents()
#8 /data/web/public/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()
#9 /data/web/public/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#10 /data/web/public/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#11 /data/web/public/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#12 /data/web/public/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch()
#13 /data/web/public/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(71): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#14 /data/web/public/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch()
#8730 /public/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#16 /data/web/public/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#17 /data/web/public/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#18 /data/web/public/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#19 /data/web/public/pub/index.php(30): Magento\Framework\App\Bootstrap->run()

Additional information

Related issue: https://github.com/magento/magento2/issues/34975

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @timpea-splat. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

p24-max commented 1 year ago

Facing same issue with Magento 2.4.4-p6, is there any fix for it?

engcom-Bravo commented 1 year ago

Hi @timpea-splat,

Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2023-10-27 at 12 04 34 PM Screenshot 2023-10-27 at 12 26 29 PM

There is no error in exception.log.

Kindly recheck the behaviour on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.

Thanks.

engcom-Bravo commented 1 year ago

Hi @timpea-splat,

We have noticed that this issue has not been updated since long time.
Hence we assume that this issue is fixed now, so we are closing it. Please feel to raise a fresh ticket or reopen this ticket if you need more assistance on this.

Thanks.

rejith7 commented 10 months ago

Hi, i've faced the same issue on 2.4.5-p4 EE and my recaptcha on frontend customer account create page fails mostly. I tested on both V2 invisible and V3 invisible, but both gave same listed error

rejith7 commented 10 months ago

@p24-max we're you able to resolve this issue ?

p24-max commented 10 months ago

@rejith7 I disabled the recaptcha as its not working properly :/

minhluan259 commented 9 months ago

Facing same issue with Magento Magento 2.4.6-p3, 2.4.7-beta1, 2.4.7-beta2 any update on this?

minhluan259 commented 9 months ago

@engcom-Bravo the exception.log appear when a bot attack (tool) create a post request without recaptcha param.

Here the debug info:

[2024-01-30T05:39:37.024093+00:00] main.INFO: createpost [] []
[2024-01-30T05:39:37.027508+00:00] main.INFO: customer [] []
[2024-01-30T05:39:37.027721+00:00] main.INFO: success_url=&error_url=&firstname=https://jmybd.blogspot.sg/ - 517610 RUB GAZPROM&lastname=https://jmybd.blogspot.sg/ - 517610 RUB GAZPROM&email=1661919960751685@facebook.com&password=d263sqeR4ha5BXr&confirmation=d263sqeR4ha5BXr&form_key=baEtSv32jdr55xaZ [] []
[2024-01-30T05:39:37.027863+00:00] main.INFO: Array
(
    [success_url] => 
    [error_url] => 
    [firstname] => https://jmybd.blogspot.sg/ - 517610 RUB GAZPROM
    [lastname] => https://jmybd.blogspot.sg/ - 517610 RUB GAZPROM
    [email] => 1661919960751685@facebook.com
    [password] => d263sqeR4ha5BXr
    [confirmation] => d263sqeR4ha5BXr
    [form_key] => baEtSv32jdr55xaZ
)
 [] []
davirs commented 9 months ago

same problem here. I can simulate this error on the standard Magento registration screen /customer/account/create/ So it's not something specific caused by "bots"...

I also noticed that it is random, filling out the form with exactly the same data sometimes works and other times it doesn't.

I believe it could be a problem with sessions/cache, since we use varnish+redis... If it were a fault in the code or in the captcha settings, all attempts should fail, right?

kennylawrence commented 9 months ago

Apparently I have been getting this for some time, I just missed it in a sea of unrelated exceptions. I am using 2.4.6-p1. @davirs I'm also using varnish+redis

jorgb90 commented 7 months ago

Same issue here with recaptcha enabled!

Same https://github.com/magento/magento2/issues/34975

chrisoliver90 commented 4 months ago

We have the same issue on 2.4.7-p1 It seems very intermittent in the logs and I am unable to replicate. Is this believed to be to do with customer account creation? Seems somewhat related to 34975 from a couple years ago. Possibly to do with bots trying to create customer accounts?

indrisepos commented 2 months ago

I have the same problem. We are using 2.4.7-p2

arvind-curotec commented 1 month ago

same issue

bolasevich commented 1 month ago

same issue