Recaptcha validation failing but no error code

4,776 views
Skip to first unread message

rcough...@gmail.com

unread,
Sep 7, 2016, 11:48:20 AM9/7/16
to reCAPTCHA
I'm using Postman to attempt the server side validation. However, the response I get says it fails, but gives no reason why i.e. no error code:

{
  "success": false,
  "challenge_ts": "2016-09-07T15:04:47Z",
  "hostname": "localhost"
}

My postman Post is 

secret: secret
response: g-recaptcha-response. 

bob.t...@matssoft.com

unread,
Sep 15, 2016, 6:30:26 AM9/15/16
to reCAPTCHA
I am having the same issue all the time. Only once or twice has the verify request ever returned success as true, the rest of the time it returns false but never with any error codes.
In all my testing the actual ReCaptcha tickbox and any image grids work fine, and I get the green tick, it is just the server side verification that has a problem.

I have searched various forums and there are lots of people who have the same problem, but I haven't seen any answers to this problem as yet.

Ramakanth Gidijala

unread,
Sep 15, 2016, 8:01:25 AM9/15/16
to reca...@googlegroups.com
server side validation will return false if the grecaptcharesponse is passed after few mins. I saw that its working, if i validate it with in few mins of user passing the captcha.

Regards
Ram
--
You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to recaptcha+unsubscribe@googlegroups.com.
To post to this group, send email to reca...@googlegroups.com.
Visit this group at https://groups.google.com/group/recaptcha.
For more options, visit https://groups.google.com/d/optout.


--
Sent from Gmail Mobile

bob.t...@matssoft.com

unread,
Sep 15, 2016, 9:17:49 AM9/15/16
to reCAPTCHA
Thanks Ram. Certainly in my testing the request is sent within seconds, not sure about anyone else though but I would imagine sending it after several minutes would not be a common scenario.

Seth Munroe

unread,
Sep 18, 2016, 1:31:24 PM9/18/16
to reCAPTCHA
One thing to be aware of is that the reCAPTCHA validation of the response is only valid for 2 minutes from the time that the user successfully passed the reCAPTCHA on the page. That might have been a while before they submitted the page though.

This means that if the user does the reCAPTCHA first then spends more than 2 minutes filling out any other fields on the page and then submits it to you, the g-recaptcha-response value has already expired long before it ever got to your site.

It works best when there is very little on the page for the user to do/read.

If you have to have a lengthy form on the page, then it's usually best to put the recaptcha very low on the page and right near the submit button for your form.

-Seth

Mike Barber

unread,
Nov 8, 2016, 12:43:12 PM11/8/16
to reCAPTCHA
I have the same issue server side. There is at most few seconds between solving the captcha and submitting it. 

Seth Munroe

unread,
Nov 8, 2016, 12:50:15 PM11/8/16
to reCAPTCHA
Localhost isn't supported but if you want to test it in your non-production environments see this FAQ:

-Seth

Mike Barber

unread,
Nov 8, 2016, 1:29:27 PM11/8/16
to reCAPTCHA
I get this same problem whether I am on localhost or in our dev environment. I have all the domains listed in the recaptcha settings. I've seen the domain error and this isn't it. It just fails with no reason. In other words success is false, but there is no error code. I'm using angular 2. I complete the captcha correctly and do get the captcha token. But when I verify that same token on the server side I just get success:false with no error code.
-Mike

Mike Barber

unread,
Nov 8, 2016, 3:41:22 PM11/8/16
to reCAPTCHA
In may case I found the issue: I was doing a get, not a post. So no errors, but it failed. When I properly switched to POST it was fine.
Reply all
Reply to author
Forward
0 new messages