recaptcha_v3 working intermittenly

Created on 3 April 2024, 9 months ago
Updated 24 July 2024, 5 months ago

I configured recaptcha_v3 in the site, but it is operating intermittently and giving the following error.

"Google reCAPTCHA v3 validation failed: The response parameter is invalid or malformed. Expected action did not match "

ReCAPTCHA v3 Module version : 2.0.2
CAPTCHA Module version : 2.0.5

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India ashetkar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ashetkar
  • 🇺🇦Ukraine dench0

    There is too little information. Is your site online and if so, then can you send me a PM with the link to the page with the form?

  • 🇮🇳India ashetkar

    Hi @dench0

    Could you please let us know what else information do you need ? I have given module version, error name and configured v3 captcha and shared screenshot as well.

    Issue here is, recaptcha V3 is not working correctly. It works intermittenly and throw error as the answer entered for captcha was not correct.

    Please let us know if you need information from my side.

  • 🇺🇦Ukraine dench0

    The problem is that it's only happening to you. Hence I suppose the problem is on your side.
    Please check the browser console log and provide the form markup in the inspector, like in this commentary: https://www.drupal.org/project/recaptcha_v3/issues/3415978#comment-15406711 🐛 The response parameter is missing. Closed: works as designed

  • 🇮🇳India ashetkar

    Okay. Please find attached image.

  • 🇺🇦Ukraine dench0

    Hmm, looks good.
    What challenge do you use as a fallback?

  • 🇮🇳India ashetkar

    We are using v2 fallback method.

  • 🇺🇦Ukraine dench0

    Are you using AJAX in your form?
    Can you try to change the fallback to Math and check what happens?

  • 🇮🇳India ashetkar

    Thank you for response. We are not using ajax in form.
    Can you try to change the fallback to Math and check what happens? - Yes, I have tried and getting issue _GRECAPTCHA cookie. Please find attached screenshot.

  • 🇺🇦Ukraine dench0

    Please check if the recaptcha response was sent among the from data:

  • 🇮🇳India ashetkar

    Yes, recaptcha response is sent with data. Is there any limit for number of request for recaptcha v3 submission? Because our site having high traffic.

  • 🇺🇦Ukraine dench0

    Is there any limit for number of request for recaptcha v3 submission?

    I'm not sure, but don't think there is a limit. At least in recaptcha documentation, there is no mention of this.

    Do you have those errors when you manually submit the form? Or just have them in logs? Because if you can't reproduce it manually probably it's the bot submissions.

  • 🇮🇳India ashetkar

    yes When we submit manually we are getting error as "the answer you entered for captcha is not correct". But not always we get this error sometime request getting submitted successfully. Today all our request are submitted successfully. As of now I am monitoring Form data.

  • 🇳🇱Netherlands Maurice M.

    I'm experiencing the same problem: "Google reCAPTCHA v3 validation failed: The response parameter is invalid or malformed. Expected action did not match "

    Using the same versions:
    ReCAPTCHA v3 Module version : 2.0.2
    CAPTCHA Module version : 2.0.5

  • 🇺🇸United States seanr

    Might be useful to some folks - reducing the log level here to avoid spamming us with Sentry notifications.

  • 🇺🇦Ukraine dench0

    Hi @here,
    you can try this https://www.drupal.org/project/recaptcha_v3/issues/3447924#comment-15630224 🐛 Error message: Antibot verification failed Fixed , it might help.

  • 🇺🇸United States seanr

    @dench0, that does not look at all to me like the same issue, at least per my read of it. Am I missing something? Our CAPTCHAs work fine when we submit, we're just getting errors kicked into Sentry from obvious bots.

  • 🇺🇦Ukraine dench0

    @seanr,
    please read the issue description, it does not relate to your case.

  • 🇺🇸United States seanr

    Thank you, sorry for the noise. We muted our errors based on evidence that they were bot hits.

Production build 0.71.5 2024