ReCAPTCHA v3 Console is inaccessible plus error on preview

Created on 19 May 2022, almost 3 years ago
Updated 14 March 2023, about 2 years ago

Problem/Motivation

Sorry that this is part Bug Report, Part suppport, part documentation, and part bug report.

Following some complaints from users, we just installed reCAPTCHA v3 on top of our existing reCAPTCHA v2
While it took some time to find a workable threshold (we settled on .5 for Registration and .6 for Login and contact forms etc.), we were confused whether a 1 offered more protection or .1, because "1" seemed to kick back to the challenge regardless of which one was selected!
Can anyone confirm these settings?

We did notice that if one selects "Preview" for a form, it now throws an error:

The website encountered an unexpected error. Please try again later.

LogicException: The database connection is not serializable. This probably means you are serializing an object that has an indirect reference to the database connection. Adjust your code so that is not necessary. Alternatively, look at DependencySerializationTrait as a temporary solution. in Drupal\Core\Database\Connection->__sleep() (line 1913 of core/lib/Drupal/Core/Database/Connection.php).
serialize(Array) (Line: 14)
Drupal\Component\Serialization\PhpSerialize::encode(Array) (Line: 111)
Drupal\Core\KeyValueStore\DatabaseStorageExpirable->doSetWithExpire('form-YR_nXSXA1Wr0E4xenyNESq6spCmVt1BECilIUBsOKiI', Array, 21600) (Line: 122)
Drupal\Core\KeyValueStore\DatabaseStorageExpirable->setWithExpire('form-YR_nXSXA1Wr0E4xenyNESq6spCmVt1BECilIUBsOKiI', Array, 21600) (Line: 193)
Drupal\Core\Form\FormCache->setCache('form-YR_nXSXA1Wr0E4xenyNESq6spCmVt1BECilIUBsOKiI', Array, Object) (Line: 459)
Drupal\Core\Form\FormBuilder->setCache('form-YR_nXSXA1Wr0E4xenyNESq6spCmVt1BECilIUBsOKiI', Array, Object) (Line: 437)
Drupal\Core\Form\FormBuilder->rebuildForm('contact_message_website_feedback_form', Object, Array) (Line: 629)
Drupal\Core\Form\FormBuilder->processForm('contact_message_website_feedback_form', Array, Object) (Line: 321)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object) (Line: 86)
Drupal\contact\Controller\ContactController->contactSitePage(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 578)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 717)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

But our biggest concern is when we click on a link to the Google reCAPTCHA v3 Admin Console, we are not allowed to pass due to a supposed misconfiguration of Dynamic links?

Invalid Dynamic Link - Blocked
We could not match param 'https://www.google.com/recaptcha/admin' with whitelisted URL patterns in this Google project.

If you are the developer of this app, ensure that your Dynamic Links domain is correctly configured and that the path component of this URL is valid.

Steps to reproduce

Normal Install: Drupal 9.2.18 with Open Social 11.1.5

Proposed resolution

Suggestions for documentation

Re: The threshold settings: perhaps a more complete explanation in the Documentation!
Re: Site and Secret Keys: Explanation that these are separate from the reCAPTCHA v2 values and that one must register separately for them.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: won't fix

Version

1.6

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bas123

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024