honey icon indicating copy to clipboard operation
honey copied to clipboard

timeouts not being handled

Open rbmcgowan opened this issue 3 years ago • 3 comments

Hi, I am seeing the following errors appear in the logs occasionally. The application is hosted in a data centre so it's unlikely to be related to an internet outage, especially since there have been a few of them over the past month. Regardless, it would be good if the code monitored for this and moved on rather than failing.

ERROR: The following errors were thrown when trying to resolve the recaptcha token: timeout-or-duplicate {"exception":"[object] (Lukeraymonddowning\Honey\Exceptions\RecaptchaFailedException(code: 0): The following errors were thrown when trying to resolve the recaptcha token: timeout-or-duplicate at /var/www/html/laravel/vendor/lukeraymonddowning/honey/src/Recaptcha.php:37)

rbmcgowan avatar Jan 15 '21 03:01 rbmcgowan

Hi there. Are you using Livewire?

lukeraymonddowning avatar Mar 17 '21 12:03 lukeraymonddowning

Hi Luke, no there is no Livewire.

rbmcgowan avatar Mar 17 '21 23:03 rbmcgowan

I'm using Livewire and I have previously reported this issue, and a PR was submitted and fixed the issue.

I am currently facing a similar issue again, but due to the complexity of the layout changes, I won't bother reproducing the steps.

Suffice to say, when the x hits the fan, manually call '$this->requestRecaptchaTokenRefresh();' which was added by the PR. Resolved my issue in a complex setup. See if you can catch the error and call that method.

usernotnull avatar Sep 11 '21 11:09 usernotnull