CodeDistillery / angular-no-captcha

Angular.JS wrapper for Google's No CAPTCHA reCAPTCHA
http://codedistillery.github.io/angular-no-captcha/
MIT License
42 stars 21 forks source link

Error after closing modal #21

Closed tstavinoha closed 9 years ago

tstavinoha commented 9 years ago

Hey there

I use the no-captcha in my modal dialog, that I open up via angular-bootstrap $modal. After the modal is closed and removed from the DOM, clicking anywhere on the web page throws an error Error: Permission denied to access property "I4_1430420130990" (property name varies) in script cb=gapi.loaded.

The error will only happen if I actually click on the recaptcha (attempt to obtain a response). Multiple reproductions of this error result in adding, e.g. attempting to validate 2 times will cause 2 errors on every click, 3 times equal 3 errors per click etc.

The captcha itself works properly.

Has anyone encountered something like this? Thanks

vepasto commented 9 years ago

Check out my angular bootstrap test https://vepasto.github.io/angular-no-captcha-test/ If you have different setup, please make a pull request to gh-pages branch

tstavinoha commented 9 years ago

The test has the same issue.

Javascript error is more insightful in Chrome, it says: Uncaught SecurityError: Blocked a frame with origin "https://www.google.com" from accessing a frame with origin "https://vepasto.github.io". Protocols, domains, and ports must match.

It seems to be a general problem with NoCaptcha API, here is a discussion about it: https://groups.google.com/forum/#!topic/recaptcha/miaW9qdVIgA

Would it make sense to include some of the proposed workarounds in the lib?

vepasto commented 9 years ago

Does version 0.4.4 resolve your issue?

tstavinoha commented 9 years ago

Yes, the new version works flawlessy! Thank you for promt resolve :)