reset 400

320 views
Skip to first unread message

Shmuli Pinson

unread,
Sep 2, 2015, 4:03:33 PM9/2/15
to reCAPTCHA
Hi,

When resting by calling grecaptcha.reset AFTER completing a successful image test, a 400 error is thrown when trying to load the image lightbox.

The error is on thie GET
https://www.google.com/recaptcha/api2/frame?c=03AHJ_VutnCmz25kQQIDIO3qtRw6sarRWKSiDLcTJ_YwiJKHmXSAwgavwcavXDTTQ8k4GF8n2IdKTcmiv9yVtHMHvscAqu_508MflaUHj5OhtE1Q4-OBXm9yzFY0dZHaK2KYWSaG3R5xMOVvJNwBB20LXhsz_EX1W9AbCxB4Jqnz7_uKCtM9_68_xL6iKSlecU0vHR4CIiaP1rTdEyxo3D9_kGwM11cHxLDEHO48A83ghgJF1oCdM6ujUEz41iHISttAOwEbbM_y75COFL_2C8GngAxWM2QFDhMnMokNDuOD2jY7Y-VMDRnBHx6lyj8KW6WIshOyvsOcAghbfo58CzlSHduL0WylJe9eflclFRcF-CnBlo6aSBLuvu_vzuh--7jExRdio-rGAGhDDBM0bRAv2MvOVH2sDiEuoQdU5ZWHv18vbhUnZLhXxhEZO9dFpycLQFOB2PqCMZ&hl=en&k=6LdaSQgTAAAAAOy0vzAg8ePSXFtumjR659Lt7AdP&v=r20150826120751&bcr="%"5B1519036196"%"2C-768600381"%"2C814397074"%"2C-1807590786"%"2C-1613546319"%"2C-1034892494"%"2C968463997"%"2C-969975929"%"2C1113024522"%"2C1391649448"%"2C-681446563"%"2C2113821443"%"2C-2100960209"%"2C1270993617"%"2C738383212"%"2C2073348507"%"5D&bg=!5eNHQ0TNtXrMnF9BzR9CCdfO-MAHAAAAKVcAAAAGLwDfjpk3H4T2YSIAm55-Nw3_19dn_jRiQsI_4OtQW1R9SZDDcc2dyAcgp2f-_xmu9-ER9kjTDlFYXi4g_0UC4Q3Ebvg0u5RqJpW7MkCXqhf7wrpGfWbpcfFy5-L4pJJxMS8MGtQ-ibQE3BXrjvt9G_aTGiZS5miNeQbxHCFznVX4ADowaMttmKQ1vCQ8tM9HzAo5xFurUEtOL-z8Qa7YxnIUuHEp2fIwWU1PMbg78bHqzXARaUtbRYUHb5H9ksqPdF_HCdvQuKiRYVohVNAFUARRu17-wiN7kEaam4obUjCAHA&chr="%"5B0"%"2C59"%"2C65"%"5D&usegapi=1&jsh=m"%"3B"%"2F_"%"2Fscs"%"2Fapps-static"%"2F_"%"2Fjs"%"2Fk"%"3Doz.gapi.en_US.qgkC3_JyzAw.O"%"2Fm"%"3D__features__"%"2Fam"%"3DAQ"%"2Frt"%"3Dj"%"2Fd"%"3D1"%"2Ft"%"3Dzcms"%"2Frs"%"3DAGLTcCMv1pZcbsSlJ5nmYxjrW8SUhCfQbQ

The response is a 
  1. Status Code:
    400 OK
<HTML>
<HEAD>
<TITLE>Bad Request</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Bad Request</H1>
<H2>Error 400</H2>
</BODY>
</HTML>




Does anybody else have this issue?

Note: my implementation is with a secure token (https://developers.google.com/recaptcha/docs/secure_token); not sure if this is a factor.

To test this you can simply do the following:
var widgetId = grecaptcha.render(container, { 'sitekey' : 'your_site_key', 'stoken' : 'site_token' });

Then after it loads, complete the image test (going incognito will ensure the test comes up), and then call 
grecaptcha.reset(widgetId);

And try to check the checkbox -- it'll just continue spinning.


I also tried:
grecaptcha.reset(widgetId, { 'sitekey' : 'your_site_key', 'stoken' : 'site_token' }));


Thanks!

Tom Borger

unread,
Sep 24, 2015, 2:40:58 PM9/24/15
to reCAPTCHA
Curious if you (or anyone else) ever found a solution to this. We have the exact same problem, exact same setup. I can't find a way to successfully reset the recaptcha without reloading the entire page. Even destroying the entire container element and re-rendering with a brand new secure token causes the problem described in the FAQs here.

Adrian Chwiałkowski

unread,
Oct 8, 2015, 8:03:50 AM10/8/15
to reCAPTCHA
I had exactly the same problem and the solution for my case is generate a new token and then run:

grecaptcha.reset(widgetId, { 'sitekey' : 'your_site_key', 'stoken' : 'site_token' }));



Puneet Arora

unread,
Oct 26, 2015, 3:13:57 PM10/26/15
to reCAPTCHA
Thanks Adrian,  it worked for me. 
Reply all
Reply to author
Forward
0 new messages