anhskohbo / no-captcha

No CAPTCHA reCAPTCHA For Laravel.
https://packagist.org/packages/anhskohbo/no-captcha
MIT License
1.77k stars 233 forks source link

cURL error 28: Operation timed out after 2001 milliseconds with 0 bytes received #87

Closed joerjoers closed 6 years ago

joerjoers commented 6 years ago

When the recaptcha takes too long to be validated, I am encountering the error cURL error 28: Operation timed out after 2000 milliseconds with 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

Is there any way to prevent or catch the error?

capripio commented 6 years ago

hmm yes, the same issue occurred!

meyer59 commented 6 years ago

Same error here, Any way to add the Guzzle timeout in the config file ?

ghost commented 6 years ago

Same here, this hasn't occurred in the old versions!

ghost commented 6 years ago

Workaround

Increasing the timeout in this file:

/vendor/anhskohbo/no-captcha/src/NoCaptcha.php

$this->http = new Client([ 'timeout' => 7.0 ]);

solved the problem for me.

amirgee007 commented 6 years ago

ja-heller mate its ok its solved the issue but every time whenever i update my composer then it will reset again...

what should i do for this??

leocarmo commented 6 years ago

Use this to publish config file:

php artisan vendor:publish --provider="Anhskohbo\NoCaptcha\NoCaptchaServiceProvider"

then edit timeout

arcanoix commented 6 years ago

@ja-heller thanks you solution solved the problem for me.

anhskohbo commented 6 years ago

I increment timeout to 30 seconds to avoid this issue. https://github.com/anhskohbo/no-captcha/blob/master/src/config/captcha.php