-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Javascript Exception #16
Comments
@manderson420 I got the same JavaScript exception, tried to fix it with your solution (remove the line of code you mentioned), but it didn't help. Could you please let me know have you ended up have it resolved? @fjcaetano what I found different with @manderson420 's findings was: I only get the javascript exception for the first time call of recaptcha on a fresh install, after that |
@manderson420 and @zoewenRB, could you check if the branch @zoewenRB, the lib does not reset a ReCaptcha after it has been used or it fails. Google's API has no feature for this, so it's simpler and safer to just initialise a new ReCaptcha object. |
@fjcaetano thanks very much for the fix and response, helped a lot. I don't get the javascript exception anymore. Tried to use a new ReCaptcha instance after every time it fails, didn't help with the none recaptcha response issue. So i just set a timer to let it fail after waiting for 30 seconds. |
Glad to know that the fix worked for you, though it's super weird that a new ReCaptcha didn't work. Feel free to post more details or open a new issue if you need to. Adding a delay and forcing a failure shouldn't be the solution. |
Hi @fjcaetano, I will test and let you know. It is a specific device that this seems to fail for us on, so may need to wait until Monday to verify. Thanks for the quick turnaround! |
Hi @fjcaetano I tested on the device in question and we aren't getting the JS exception anymore on that branch. Thanks for the fix! Is it safe to point our podfile to that branch or are you planning a release/patch soon? |
I'll be releasing it now |
Great we will be integrating this soon so will keep you posted if there are any issues. |
This is still broken on version 1.0.1 for us. iOS 11.0 iPhone 6 device. This ONLY seems to be an issue on iOS 11.0 so far; not on any minor/major revisions after it. We are getting the following error from the ReCaptcha library:
Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=16, WKJavaScriptExceptionMessage=TypeError: undefined is not an object (evaluating 'document.getElementsByTagName("div")[4].outerHTML = ""'), WKJavaScriptExceptionColumnNumber=44, WKJavaScriptExceptionSourceURL=https://ourdomain.com/, NSLocalizedDescription=A JavaScript exception occurred}
The curious thing is that this causes an exception every other time we kick off the ReCaptcha webview flow. The following time we get a successful result. Any ideas?
Update: As mentioned from @fjcaetano: that seems to be a different error. It appears to have been introduced with 78fa352, since it fails on getElementsByTagName("div")[4].
Could you open a new issue so we can address this?
Also, as a workaround, could you try removing that line from recaptcha.html to check if the issue stops?
The text was updated successfully, but these errors were encountered: