Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Can not resolve reCAPTCHA parameter" entries in exception.log for Google reCAPTCHA Admin Panel #34975

Closed
1 of 5 tasks
stevekem opened this issue Jan 14, 2022 · 76 comments
Closed
1 of 5 tasks
Labels
Area: Admin UI Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@stevekem
Copy link

stevekem commented Jan 14, 2022

Preconditions (*)

  1. Magento 2.4.3-p1

Steps to reproduce (*)

  1. Go to Configuration > Security > Google reCAPTCHA Admin Panel

  2. Add your Google API Website Key & Google API Secret Key to any reCAPTCHA below:

reCAPTCHA v2 ("I am not a robot")
reCAPTCHA v2 Invisible
reCAPTCHA v3 Invisible

  1. Select your reCAPTCHA version (with API keys above) for either below:

Enable for Login
Enable for Forgot Password

  1. Save config

  2. Flush cache

Expected result (*)

  1. No entry in var/log/exception.log file

Actual result (*)

  1. Below entry every few seconds/minutes constantly with no traffic:

main.ERROR: Can not resolve reCAPTCHA parameter. {"exception":"[object] (Magento\Framework\Exception\InputException(code: 0): Can not resolve reCAPTCHA parameter. at /home/xxxxxxx/public_html/vendor/magento/module-re-captcha-ui/Model/CaptchaResponseResolver.php:25)"} []

  • Getting around 12,000 entry lines every 24 hours in exception.log file which is getting huge in a short period of time.
  • Keys have been triple checked to make sure correct, even created new ones with no change in behavior.
  • reCAPTCHA for both Admin and Frontend seems to be working.
  • Only known way to stop entries is disable both "Enable for Login" and "Enable for Forgot Password" for Admin Storefront.
  • reCAPTCHA for Frontend storefront isn't experiencing this issue for us for all enabled areas.

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Jan 18, 2022

Hi @engcom-Hotel. 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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@0xMatt
Copy link

0xMatt commented Jan 19, 2022

Same issue. Happens all the time.

[2022-01-17 14:31:45] main.ERROR: Can not resolve reCAPTCHA parameter. {"exception":"[object] (Magento\\Framework\\Exception\\InputException(code: 0): Can not resolve reCAPTCHA parameter. at /var/www/html/magento/vendor/magento/module-re-captcha-ui/Model/CaptchaResponseResolver.php:25)"} []

[2022-01-17 16:21:40] main.ERROR: Can not resolve reCAPTCHA parameter. {"exception":"[object] (Magento\\Framework\\Exception\\InputException(code: 0): Can not resolve reCAPTCHA parameter. at /var/www/html/magento/vendor/magento/module-re-captcha-ui/Model/CaptchaResponseResolver.php:25)"} []

Captcha works. The badge is loaded and visible. When I go to log in, I'll get an error message saying something went wrong. I'll have to log in 2-3 times and around the third time it'll let me in. No javascript console errors are present during this issue.

@stevekem
Copy link
Author

Captcha works. The badge is loaded and visible. When I go to log in, I'll get an error message saying something went wrong. I'll have to log in 2-3 times and around the third time it'll let me in. No javascript console errors are present during this issue.

Yes this happens as well, I forgot to mention that. Thank you!

@stevekem
Copy link
Author

Just wanted to note that we are getting the "Something went wrong with reCAPTCHA. Please contact the store owner." error on frontend too, not just on Admin. The 12,000+ daily log entries are happening with Admin module though.

@engcom-Hotel engcom-Hotel removed their assignment Jan 21, 2022
@ihor-sviziev
Copy link
Contributor

We got the same issue, but after analyzing it - it looks like we're getting a lot of such messages because some bot(s) are trying to create a customer, and captcha validation fails for them. We weren't able to reproduce this issue ourselves.

@stevekem
Copy link
Author

We got the same issue, but after analyzing it - it looks like we're getting a lot of such messages because some bot(s) are trying to create a customer, and captcha validation fails for them. We weren't able to reproduce this issue ourselves.

Thanks for the info! How could we verify if that is the case for us as well?

@ihor-sviziev
Copy link
Contributor

@stevekem, we analyzed logs, the interval between requests from the same IP address was ~0-3 sec (usually people don't do requests so quickly), the requests were to /customer/account/create/, /customer/account/createpost/ and to /customer/account/create/<product_url_path>/.
The last case links are not available on the website, so that's some bot for sure.

@stevekem
Copy link
Author

@ihor-sviziev Ok gotcha! If it is the bots, just block them in robots? Did that resolve the issue for you?

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Jan 26, 2022

@stevekem that looks like bots that are trying to hack or do something similar by creating a new customer

@stevekem
Copy link
Author

@ihor-sviziev In your case, did you block the bots in robots.txt to resolve the issue?

@ihor-sviziev
Copy link
Contributor

@stevekem yes, the requests starting with /customer/ are blocked by default and we're not removed that.

@stevekem
Copy link
Author

@ihor-sviziev Thank you, appreciate it! Will check our logs and see if that's the case for us as well.

@engcom-Delta engcom-Delta self-assigned this Mar 1, 2022
@m2-assistant
Copy link

m2-assistant bot commented Mar 1, 2022

Hi @engcom-Delta. 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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Delta
Copy link
Contributor

Hi @stevekem ,
Thank you for reporting the issue,We are unable to reproduce the issue on Magento 2.4 develop branch.Please review provided steps.
Steps Followed:

1.Login to admin Panel
2.Go to Stores-->Configuration-->Security-->Google Recaptcha Admin Panel-->reCAPTCHA v2("I am not a robot)
3.Added Google API Website Key and Google API Secret Key to reCAPTCHA v2("I am not a robot)
4.Enabled for Login
Enabled for Forgot Password
5.Saved the configuration
6.Flush Cache

Actual Results
1.No entry in var/log/exception.log file
Screenshot from 2022-02-23 20-11-06

Hence Adding the label "Needs Update"

@engcom-Delta engcom-Delta added Issue: needs update Additional information is require, waiting for response and removed Issue: ready for confirmation labels Mar 3, 2022
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Mar 3, 2022
@engcom-Delta
Copy link
Contributor

We have noticed that this issue has not been updated for a period of more than 14 Days.
Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.

@knoorani-ijona
Copy link

We are still facing this issue. In my case, a captcha is needed for the newsletter subscription form. Same error.
[2022-04-13 13:13:03] main.ERROR: Can not resolve reCAPTCHA parameter. {"exception":"[object] (Magento\\Framework\\Exception\\InputException(code: 0): Can not resolve reCAPTCHA parameter. at /home/xxxxxx/public_html/vendor/magento/module-re-captcha-ui/Model/CaptchaResponseResolver.php:25)"} []

@Hanhan1989
Copy link

Hanhan1989 commented Apr 17, 2022

@engcom-Delta @knoorani-ijona Same problem in Magento 2.4.4 in admin loggin page. it seems that the error is reproduced only in production mode
main.ERROR: Magento\Framework\Exception\InputException: Can not resolve reCAPTCHA parameter. in vendor/magento/module-re-captcha-ui/Model/CaptchaResponseResolver.php:25

@Hanhan1989
Copy link

Hanhan1989 commented Apr 17, 2022

In my case, there were two javascript errors that caused me to not be able to log in. These errors are due to the minification of the collapse.js and tab.js files in the lib/web/jquery/bootstrap/ path.

So the solution to this problem has been to exclude those files from the minification.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <dev>
            <js>
                <minify_exclude>
                    <collapse>/jquery/bootstrap/collapse</collapse>
                    <tab>/jquery/bootstrap/tab</tab>
                </minify_exclude>
            </js>
        </dev>
    </default>
</config>

@Themageguru
Copy link

Themageguru commented Apr 28, 2022

Hello, We got the same issue in magento version 2.4.3. lot of exception errors in log file. Also, I did try above all solution but didn't work any one. Any update on this issue.

@tschirmer
Copy link

yeah it's a long time between writing the bugfix and getting into a release version. Would be good to get attribution on my work there @engcom-Hotel

@briangmoore77
Copy link

@Hanhan1989 you disabled the recaptcha completely?

@Hanhan1989
Copy link

@Hanhan1989 you disabled the recaptcha completely?

I only disabled the Recaptcha of the admin user login form.

bin/magento security:recaptcha:disable-for-user-login

@briangmoore77
Copy link

@Hanhan1989 you don't have bots hitting your other login pages causing the same error?

@Hanhan1989
Copy link

@briangmoore77 I only had problem of Recaptcha in the admin user login form. In the Frontend, all Ok.

@hprasetyou
Copy link

Weird for me, the error message are there on the system.log, but i can still logged in on chrome and safari, but cannot be logged in on firefox

@rossparachute
Copy link

rossparachute commented Jan 31, 2023

v2.4.5-p1 - bug still present on the frontend forms.

Same exception:
Magento\Framework\Exception\InputException: Can not resolve reCAPTCHA parameter. in /vendor/magento/module-re-captcha-ui/Model/CaptchaResponseResolver.php:25

The actual ReCaptcha v3 Invisible badge itself renders but I'm not seeing a recaptcha-response field being added to the form that could then be used to validate the form submission.

Notable forms:

  • Login
  • Forgotten Password
  • Register

@tschirmer fix - totally welcome but doesn't fix the frontend issue (though, wasn't intended to as far as I can see).

Oddly, the captcha is on the Checkout form too and that appears to be behaving fine.

@peterjaap
Copy link
Contributor

@engcom-Alfa @engcom-Bravo @engcom-Charlie @engcom-Delta @engcom-Hotel it seems this isn't fixed at all.

Maybe in 2.4.6 but then we'd like to see a commit with the fix so we can patch our stores. Please advise.

@rossparachute
Copy link

@peterjaap

Your mileage may vary but we found we had to manually add in the ReCaptcha block back into the forms.

I think there's some move/remove statement somewhere in Magento or a module we all have in common that is taking out the block named "recaptcha" that is intended to be output in the form_additional_info child block.

So we had to create the following under <theme_name>/Magento_ReCaptchaCustomerLayout:

  1. customer_account_create.xml
  2. customer_account_edit.xml
  3. customer_account_forgotpassword.xml
  4. customer_account_login.xml
  5. default.xml

The form layout files were all pretty much the same:

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <!-- Required to ensure the ReCaptcha actually gets added - something is taking it out in 2.4.5 -->
        <!-- Note renaming the block from "recaptcha" to "recaptcha.magento" -->
        <referenceContainer name="customer_form_edit">
            <block class="Magento\ReCaptchaUi\Block\ReCaptcha"
                   name="recaptcha.magento"
                   after="-"
                   template="Magento_ReCaptchaFrontendUi::recaptcha.phtml"
                   ifconfig="recaptcha_frontend/type_for/customer_edit">
                <arguments>
                    <argument name="recaptcha_for" xsi:type="string">customer_edit</argument>
                    <argument name="jsLayout" xsi:type="array">
                        <item name="components" xsi:type="array">
                            <item name="recaptcha" xsi:type="array">
                                <item name="component" xsi:type="string">Magento_ReCaptchaFrontendUi/js/reCaptcha</item>
                            </item>
                        </item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

Then in your form, output the child HTML block:

<form>
...
<?= $block->getChildHtml('recaptcha.magento') ?>
...
</form>

P.S For what it's worth we're also using the mageplaza/module-google-recaptcha package (v^4.0) for the admin which can do ReCaptcha too although that's disabled on the frontend. When I looked at the module's layout XML files I couldn't see it moving/removing anything. I don't think that's affecting things but it's worth nothing.

@engcom-Hotel
Copy link
Contributor

@peterjaap I have provided the related commits for this fix here #34975 (comment). Does it help in moving further with this?

@BernardRobbins-BMediaLLC
Copy link

BernardRobbins-BMediaLLC commented Feb 15, 2023

magento/product-community-edition 2.4.5-p1
PHP 8.1.13
nginx 1.18.0

I'm also getting this error flooding my logs:

Magento\Framework\Exception\InputException: Can not resolve reCAPTCHA parameter. in /var/www/html/vendor/magento/module-re-captcha-ui/Model/CaptchaResponseResolver.php:25
Stack trace:
#0 /var/www/html/vendor/magento/module-re-captcha-ui/Model/RequestHandler.php(112): Magento\ReCaptchaUi\Model\CaptchaResponseResolver->resolve()
#1 /var/www/html/vendor/magento/module-re-captcha-customer/Observer/CreateCustomerObserver.php(67): Magento\ReCaptchaUi\Model\RequestHandler->execute()
#2 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Magento\ReCaptchaCustomer\Observer\CreateCustomerObserver->execute()
#3 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod()
#4 /var/www/html/vendor/magento/framework/Event/Manager.php(65): Magento\Framework\Event\Invoker\InvokerDefault->dispatch()
#5 /var/www/html/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch()
#6 /var/www/html/vendor/magento/framework/App/FrontController.php(279): Magento\Framework\Event\Manager\Proxy->dispatch()
#7 /var/www/html/vendor/magento/framework/App/FrontController.php(211): Magento\Framework\App\FrontController->dispatchPreDispatchEvents()
#8 /var/www/html/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()
#9 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#10 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#11 /var/www/html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#12 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch()
#13 /var/www/html/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(75): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#14 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch()
#15 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#16 /var/www/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#17 /var/www/html/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#18 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#19 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent()
#20 /var/www/html/vendor/justbetter/magento2-sentry/Plugin/GlobalExceptionCatcher.php(78): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#21 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): JustBetter\Sentry\Plugin\GlobalExceptionCatcher->aroundLaunch()
#22 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#23 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http\Interceptor->___callPlugins()
#24 /var/www/html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#25 /var/www/html/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#26 {main}

Here's the nginx logs from the flood of bots:

103.233.254.62 - - [15/Feb/2023:16:19:56 +0000] "GET /customer/account/create HTTP/1.1" 200 41450 "https://www.{our_website}.com/customer/account/create" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
103.233.254.62 - - [15/Feb/2023:16:19:56 +0000] "POST /customer/account/createpost/ HTTP/1.1" 302 5 "https://www.{our_website}.com/customer/account/create" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"

@engcom-Hotel I've noticed your commits are for the admin login. Will this also somehow fix the frontend customer account creation?

@hostep
Copy link
Contributor

hostep commented Feb 16, 2023

@BernardRobbins-BMediaLLC, another batch of commits got merged yesterday, that have something to do with recaptcha, maybe those help in your case? Just guessing here ...

@BernardRobbins-BMediaLLC

@hostep, thanks, it doesn't appear any of those will resolve this.

@sebfie
Copy link

sebfie commented Mar 21, 2023

I still have this issue in 2.4.6

@quyendam2612
Copy link

I can confirm the issue still happens in 2.4.6

@OvalMedia
Copy link

I think as long as this thread is closed nobody will take notice.

@Hanhan1989
Copy link

I have Magento 2.4.6 and it works correctly。I think the error may be due to third party extensions。

@AlexandreBulete
Copy link

Hi,

I didn't faced this issue in admin panel but in a front page.
I saw that was caused by moving the form.additional.info container. This container contains a few blocks, including the recaptcha block.

You should verify if this block is present in your admin form by using a debugtoolbar as Smile_DebugToolbar

My account login page include the form login and the form register then the container was moved in the register form and wasn't present in the login form.

Then I had to add this recaptcha block myself inside a custom form.additional.info.login container which is itself inside my login form :

<container name="form.additional.info.login" as="form_additional_info_login">
    <block class="Magento\ReCaptchaUi\Block\ReCaptcha"
        name="recaptcha.login"
        after="-"
        template="Magento_ReCaptchaFrontendUi::recaptcha.phtml"
        ifconfig="recaptcha_frontend/type_for/customer_login"
    >
        <arguments>
            <argument name="recaptcha_for" xsi:type="string">customer_login</argument>
            <argument name="jsLayout" xsi:type="array">
                <item name="components" xsi:type="array">
                    <item name="recaptcha" xsi:type="array">
                        <item name="component" xsi:type="string">Magento_ReCaptchaFrontendUi/js/reCaptcha</item>
                    </item>
                </item>
            </argument>
        </arguments>
    </block>
</container>

@0xMatt
Copy link

0xMatt commented Jun 1, 2023

Still having this issue in 2.4.6

@perryholden
Copy link

The patch supplied above works for me on version 2.4.4-p5. Thanks to @tschirmer and @C4rter.

@frostitution
Copy link

frostitution commented Sep 29, 2023

Discovered this issue not too long after enabling official Magento reCAPTCHA Checkbox (Customer Registration Form only) on Magento 2.4.6, still an issue

@AlexandreBulete
Copy link

Each form "Recaptchable" has an additional script block added. You have to watch the corresponding recaptcha module.
For example : module-re-captcha-newsletter add this block :

<referenceContainer name="footer">
            <block class="Magento\ReCaptchaUi\Block\ReCaptcha"
                   name="recaptcha-newsletter"
                   after="-"
                   template="Magento_ReCaptchaNewsletter::recaptcha_newsletter.phtml"
                   ifconfig="recaptcha_frontend/type_for/newsletter">
                <arguments>
                    <argument name="recaptcha_for" xsi:type="string">newsletter</argument>
                    <argument name="jsLayout" xsi:type="array">
                        <item name="components" xsi:type="array">
                            <item name="recaptcha" xsi:type="array">
                                <item name="component" xsi:type="string">Magento_ReCaptchaFrontendUi/js/reCaptcha</item>
                            </item>
                        </item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>

Are you sure your layout is including this additional script block ?

I noticed it after dd() the $request->getParams() in this CaptchaResponseResolvermodel.
If you haven't the requested recaptcha params then it seems you didn't include this script block.

@rossparachute
Copy link

Each form "Recaptchable" has an additional script block added. You have to watch the corresponding recaptcha module. For example : module-re-captcha-newsletter add this block :

<referenceContainer name="footer">
            <block class="Magento\ReCaptchaUi\Block\ReCaptcha"
                   name="recaptcha-newsletter"
                   after="-"
                   template="Magento_ReCaptchaNewsletter::recaptcha_newsletter.phtml"
                   ifconfig="recaptcha_frontend/type_for/newsletter">
                <arguments>
                    <argument name="recaptcha_for" xsi:type="string">newsletter</argument>
                    <argument name="jsLayout" xsi:type="array">
                        <item name="components" xsi:type="array">
                            <item name="recaptcha" xsi:type="array">
                                <item name="component" xsi:type="string">Magento_ReCaptchaFrontendUi/js/reCaptcha</item>
                            </item>
                        </item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>

Are you sure your layout is including this additional script block ?

I noticed it after dd() the $request->getParams() in this CaptchaResponseResolvermodel. If you haven't the requested recaptcha params then it seems you didn't include this script block.

Ditto.

As @AlexandreBulete says, just add it in yourself. You should see a hidden (or similar) in each form you want to use recaptcha in. Less convenient, but it sorts it.

@frostitution
Copy link

Each form "Recaptchable" has an additional script block added. You have to watch the corresponding recaptcha module. For example : module-re-captcha-newsletter add this block :

<referenceContainer name="footer">
            <block class="Magento\ReCaptchaUi\Block\ReCaptcha"
                   name="recaptcha-newsletter"
                   after="-"
                   template="Magento_ReCaptchaNewsletter::recaptcha_newsletter.phtml"
                   ifconfig="recaptcha_frontend/type_for/newsletter">
                <arguments>
                    <argument name="recaptcha_for" xsi:type="string">newsletter</argument>
                    <argument name="jsLayout" xsi:type="array">
                        <item name="components" xsi:type="array">
                            <item name="recaptcha" xsi:type="array">
                                <item name="component" xsi:type="string">Magento_ReCaptchaFrontendUi/js/reCaptcha</item>
                            </item>
                        </item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>

Are you sure your layout is including this additional script block ?

I noticed it after dd() the $request->getParams() in this CaptchaResponseResolvermodel. If you haven't the requested recaptcha params then it seems you didn't include this script block.

I see this template on my site and I am still receiving the error for frontend Customer Registration

@rejith7
Copy link

rejith7 commented Jan 4, 2024

@frostitution I'm getting the same error on the customer registration form(2.4.5-p4 EE). Were you able to resolve this?

@buderus199
Copy link

Same error for me on 2.4.5-p5 OS. Error occurs when bots try to register new customer account.

@krnshah
Copy link
Contributor

krnshah commented Feb 23, 2024

I am having the same issue. We are using magento2.4.6-p2 + hyva. but when create the captcha key and apply it to frontend it show same error and not allowed us to login/sign up successfully.
Can anyone please help?

@frostitution
Copy link

@rejith7 No, sorry. I left it enabled because recaptcha works, but the log errors are still there. recaptcha works for us when we test it and cannot seem to replicate this consistently. I have been monitoring for any sort of solution from anyone but no luck.

@jorgb90
Copy link

jorgb90 commented Apr 10, 2024

Issue also still here! For me it has something to do with bots (I think) cause its always happening in the night. The form itself and during the day it's working perfectly fine with Recaptcha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Admin UI Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Development

No branches or pull requests