You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, reCAPTCHA is skipped in "test" and "cucumber" env.
I discovered that the Gem can cause "Completed 500 Internal Server Error" entries in test.log. This occurs when the environment variable RECAPTCHA_SITE_KEY is not set, independent of its value.
That happened to me during CI jobs where only minimal environment variables were defined. Only after providing an empty site key environment variable the tests succeeded.
Expected behaviour
It would be great if the Gem really and cleanly is skipped in test environments without the need of (empty) environment variables.
System information
recaptcha: 5.16.0
Rails: 6.1.4.1
The text was updated successfully, but these errors were encountered:
I did not yet investigate the Gem internals, so I have no starting point for a PR.
Concerning the error or unexpected behaviour: how can I generate a backtrace? My observation is that the log only contains "Completed 500 Internal Server Error" without further context info, even with config.log_level = :debug.
could go into the gem bundle open and add a raise where it does the request
or check the code for where the site key is checked and change things there until the test works (locally)
Problem
Despite the following readme statement
I discovered that the Gem can cause "Completed 500 Internal Server Error" entries in
test.log
. This occurs when the environment variableRECAPTCHA_SITE_KEY
is not set, independent of its value.That happened to me during CI jobs where only minimal environment variables were defined. Only after providing an empty site key environment variable the tests succeeded.
Expected behaviour
It would be great if the Gem really and cleanly is skipped in test environments without the need of (empty) environment variables.
System information
The text was updated successfully, but these errors were encountered: