Error Failed Recaptcha Validation Please Try Again
Hullo,
I've update the module, and I obtain this fault:
Google reCAPTCHA v3 validation failed: The response parameter is invalid or malformed. Expected action did not match. Score threshold not met.
Pantheon is proud to back up Drupal and open source
brownhiscriand1971.blogspot.com
Source: https://www.drupal.org/project/recaptcha_v3/issues/3136745
Comments
Post-obit as we're having the same result.
Even subsequently generating new v3 keys and updating the recaptcha_v3 settings in Drupal with new keys, and lowering the threshold we still see the same mistake.
Hi in that location, it seems like exist issues with the captcha caching. Pls try the latest dev version with disabled "Cacheable" settings.
Can anyone ostend that result be for the latest dev version?
Cheers for following upwards. We set aside implementation of this module after it failed on our site and we reverted back to recaptcha for the time being. We are still looking at using this and then I'll try to ready some time aside at the end of this week or offset of next to test out the dev version and written report back.
Comment #seven
mortona2k Credit Attribution: mortona2k equally a volunteer commented
Setting the threshold to 1 didn't work for me, but .9 does. Information technology'south unclear how this should be ready, but given that the v2 is a recommended compliment I presume that completing that will set up your threshold and allow v3 to work next fourth dimension.
@mortona2k What means
?
Actually is no deviation how it human activity when threshold is 0.9 or 1. It send this value to the google and all verification happens on google side: if google user points greater or equal than threshold - verification will pass, otherwise - fail.
If yous desire to not use fallback challenge and employ recaptcha v3 on fail once again - then you just demand select
- None -in theFallback challengeselect.Comment #9
baikho
Credit Attribution: baikho as a volunteer and at Access commented
We are experiencing the same issue as described by @mortona2k.
0.ixthreshold on an Activeness works, but1.0threshold always fails with the default mistake message "Antibot verification failed.". Using this module on Head of8.10-ane.xcurrently revision 267fc3765a172caa8e0e9396303578b446798cd0.We also had to specify the "Fallback claiming" every bit "- None -" which otherwise would never show the v3 reCAPTCHA. When I inspect the DOM, I tin only see the
.recaptcha-v3-tokenclass appear with this option disabled as if it is superseding the v3 reCAPTCHA. Non certain if this is expected behaviour?on #8 Pitiful, I don't empathise this. How is there no divergence betwixt threshold 0.nine or 1.0? Surely in that location is a difference otherwise they wouldn't let you specify it to that granularity?
You lot did non sympathise me. I wrote that at that place is no difference how google volition process threshold value.
If you lot will get that error with threshold 1 then google estimate possibility that you lot a homo lower than i. I'g think yous can see submitted threshold values in the google recaptcha console.
Hi, I am also experiencing the same trouble.
When dumping $verification_response in recaptcha_v3.module, I go "missing-input-response"
The whole dump looks similar:
I am using the latest version (Drupal 8, v1.3) with patch applied for "Cacheable setting is not saved when submitting the settings class (3169938)".
Even with enshroud turned off, it is the same effect.
Let me know if you need more details.
@milovan
1. Endeavour the latest dev version.
2. Check the browser console for the presence of whatsoever js errors.
@milovan
I airtight the upshot because I can't reproduce it. Feel complimentary to reopen it if you will provide more than info.
I ran into this every bit well while setting up the 1.3 version of the module on an in-development site, though it seems to exist something site-specific: other sites with the exact same configuration (version 1.3, with reCAPTCHA v3 enabled by default on the login form, with a 0.half dozen threshold and reCAPTCHA every bit a fallback) have been fine for months. Switching to the dev version of reCAPTCHA v3 seems to accept resolved it. I'm not exactly certain of the cause, but I wanted to share more than information in case it matches someone else's consequence or reveals what's going wrong:
$verification_responseoutput in #12 matches what I saw when it failed.Warning: assert(): The container was serialized. failed in Drupal\Core\DependencyInjection\Container->__sleep() (line 28 of /app/web/core/lib/Drupal/Cadre/DependencyInjection/Container.php)andLogicException: The database connexion is non serializable. This probably means you are serializing an object that has an indirect reference to the database connection. Arrange your code so that is not necessary. Alternatively, look at DependencySerializationTrait as a temporary solution. in Drupal\Core\Database\Connectedness->__sleep() (line 1574 of /app/web/core/lib/Drupal/Core/Database/Connection.php).Hi @dench0
I reopened the issue in guild to endeavour to aid you out as much as possible to effigy out why information technology is happening on some instances (as I am not lonely with this issue).
Then hither is the latest effort:
I updated module to 1.4 as it included all from dev, cache fix too.
Just for a reminder, my setup is following:
- have caching enabled
- adding course captcha point works
- removing that and adding Captcha element to the class, submit doesn't work (submit?_format=json returns "Antibot verification failed".
- I only have Recaptcha V3 with no fallback (could that be a problem?)
And then I ran debugger and after submit I get on line 181
$user_input = $form_state->getUserInput();empty array.There are no errors in Web browser console.
The $verification_response is the same as I posted here: https://www.drupal.org/projection/recaptcha_v3/issues/3136745#comment-13940375
And that is because $captcha_response is "".
Do you have any ideas or tips what / where to look the values in the debugger? This is not the offset fourth dimension this kind of error gets reported for this module, there has to exist some specific scenario when it fails.
HI @milovan.
Try to set a breakpoint hither and check what happens there.
Also, cheque which data really submitted and if in that location nowadays not empty
captcha_responsevalue. See fastened screenshot.Hey @dench0
I attached a screenshot of the payload.
The captcha_response was "Antibot verification failed."
Regarding line 208, here information technology is:
$user_input is empty assortment.
In line 222 it jumps to function _recaptcha_v3_verify_captcha_response(ReCaptchaV3ActionInterface $recaptcha_v_3_action, $captcha_response) where $recaptcha_v_3_action is initialized object only $captcha_response is empty.
It loads the secret, and in return jumps into verify() method where $response = "" and $remoteIp set. Discards empty solutions like comment in code says. In the end logs an mistake etc.
So information technology fails somewhere before that line 208.
@milovan get-go of all on your screenshot y'all accept an empty
captcha_responsevalue, and then it can't exist verified in whatever way. You need to figure out why it is empty:one. check the browser console errors.
ii. if absent-minded any errors, then cheque if yous take recaptcha token request and check response. See attached screenshot.
Also, it is strange why y'all having empty entire
$user_inputarray or yous hateful that y'all have only empty$user_input['captcha_response']value and all other values present in the$user_input?Browser console has no errors. I confirmed also that all required js loads properly.
I will give it another shot this weekend for
$user_inputevery bit that might be a good clue.@milovan
I'thou thinking you don't understand me: before you will delve into
$user_inputissue, you need to figure out why your payload has emptycaptcha_response.1. look once more to my screenshot #18 - there y'all can encounter that payload has not empty
captcha_responsevalue.2. cheque your screenshot #19 - in your payload
captcha_responsevalue is empty.3. If absent-minded any errors in your console, then you need to bank check if google token request is executing and if information technology has recaptcha token (see screenshot #20)
One more time:
is not plenty.
You need to go to the
Networktab in the browser development tools, then find the POST asking to the google and check response. Pls check my screenshot more advisedly: there you will notice how to identify that Postal service request.I was facing the same effect, only realized that it always occurs when I send the class before google recaptcha API response is available, so that captcha_response parameter is empty on the webform payload.
Yous tin check on the network when this response is bachelor by filtering by requests similar to:
https://www.google.com/recaptcha/api2/reload?k=...
This request may take a while, and then if you submit the form before it is done, or for any reason, the answer is empty or fails, information technology may happen that you won't be able to send that info to Drupal, and that it tries to apply the defined fallback.
Promise this help.
Comment #24
KarlShea
Credit Attribution: KarlShea commented
I'm having the same issue, the response from google seems malformed?
Comment #25
KarlShea
Credit Attribution: KarlShea commented
Update: lowering the threshold from 1 to 0.ix besides fixed it for me.
Annotate #26
KarlShea
Credit Attribution: KarlShea commented
And this is the configuration change. Perhaps it's some result with parsing the 1 as a float?
Yep Same outcome.
if i change the threshold: 0.9 as mentioned @KarlShea information technology works well.
@KarlShea and @ThirstySix it working fine with the threshold
1.0.I attached the screenshot from the debugging: there you can see that used threshold is
1.0and the validation result isscore-threshold-not-metbecause of google scored my interactions every bit0.9, then everything working equally it should.