desirepath41 / visualCaptcha

visualCaptcha's Main Repo. This is a collection of all the different versions/repos of visualCaptcha.
https://emotionloop.github.io/visualCaptcha-demo/
407 stars 43 forks source link

Request does not correspond to images #34

Closed mmaszkiewicz closed 7 years ago

mmaszkiewicz commented 7 years ago

Sometimes request does not correspond with the images (image to be clicked on can't be found).

Using node + jQuery front-end combo.

Unreliable in reproducing.

https://www.cambridge.org/core/register

BrunoBernardino commented 7 years ago

Hi @mmaszkiewicz thanks for reporting this.

I've seen this happen before when there is more than one instance or load call being made to visualCaptcha. Can you share a URL or some code where this is happening?

Thanks.

mmaszkiewicz commented 7 years ago

Hi @BrunoBernardino, I've updated the original request with a URL where this can be reproduced.

BrunoBernardino commented 7 years ago

Hi @mmaszkiewicz ! Thank you so much for that.

I've been able to refresh visualCaptcha and the form a few times, and correct if I'm wrong, but I only had that issue appear on the first load, sometimes. Never on a visualCaptcha refresh.

I also didn't spot anything strange in visualCaptcha's setup.

If it, in fact, only happens in the first load, it might be some frontend caching mechanism that's getting in the way (caching the HTML). You could potentially fix it by adding some JS code that removes the HTML inside '#sample-captcha' on load.

So, in your original, unminified captcha.js file, before $("#sample-captcha").visualCaptcha(...) write $('#sample-captcha').empty();, and see if the issue persists.

Let me know how that goes!

BrunoBernardino commented 7 years ago

Closing over no update.