Skip to content
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

White page on offline validation #60

Closed
andrewcookies opened this issue Nov 16, 2018 · 8 comments
Closed

White page on offline validation #60

andrewcookies opened this issue Nov 16, 2018 · 8 comments
Labels

Comments

@andrewcookies
Copy link

Hi,
I'd like to ask if it is possible to remove recaptcha web view even if the validation does not return a token.
In my particular case, before pressing 'verify' button I turned off my connectivity. The result is a white screen which is impossible to remove.

Thanks for the support,

Andrea

@fjcaetano
Copy link
Owner

Hi @AndreaGrantu. The webview should never appear without configureWebView being called. Is that happening? If so, it is an issue we need to work on.

If configureWebView is being called, you have a reference to the webview there, which you can save and remove it, if necessary.

Also, have you tried calling reset? I haven't tried, but it should do the trick of "wiping" the webview for you.

@andrewcookies
Copy link
Author

Hi,
I explain myself in a better way:

if let r = recaptcha {
r.validate(on: view) { result in
//(A)

}
}

if I turn off wifi when I'm in the recaptcha view before pressing 'validate', the code does not return in (A) section, so I cannot do anything with my view.

screen shot 2018-11-16 at 4 04 23 pm
screen shot 2018-11-16 at 4 04 04 pm

Thank you

@fjcaetano
Copy link
Owner

@AndreaGrantu I tried reproducing it on a simulator and everything worked as expected:

  • If I turn wifi off after the resources have been loaded and call validate everything works as expected.
  • If I turn off the wifi before resources have been loaded, the webview doesn't show up at all.

So here are a couple of things to look at:

  1. Is your view configured correctly? Does it work in a perfect scenario?
  2. Are you able to remove the view if necessary?
  3. Are you manually showing the webview? You shouldn't do that.
  4. Are you receiving any errors in the callback of ReCaptchaWebViewManager.execute?

If none of the above help you, then we'll need to dig some more:

  1. Are you running on a device or the simulator?
  2. Which iOS version are you running?
  3. Which version of the lib you have installed?

@andrewcookies
Copy link
Author

andrewcookies commented Nov 20, 2018

Hi,
My Answers:

Is your view configured correctly? Does it work in a perfect scenario? YES
Are you able to remove the view if necessary? YES
Are you manually showing the webview? You shouldn't do that. No, I call only validate, after the setup, as in your example
Are you receiving any errors in the callback of ReCaptchaWebViewManager.execute? NO
If none of the above help you, then we'll need to dig some more:

Are you running on a device or the simulator? NO, on a real device
Which iOS version are you running? 11.0 and 9.0
Which version of the lib you have installed? I took your last update

Moreover, even if i tap on withe space only a blank view remains on the screen and it's impossible to go back.

@fjcaetano
Copy link
Owner

Hi @AndreaGrantu, I'm still having a hard time reproducing this issue. Are you able to make it happen in the Example project? If so, could you provide the step-by-step?

If you can't reproduce it in the Example app, could you provide a repo or a zip with a project where the issue happens?

@fjcaetano
Copy link
Owner

More on the matter, @AndreaGrantu I applied some changes to how the library detects the loading of resources on PR #61, could you try checking out that branch to see if that fixes your issue?

Nonetheless, I'd still appreciate if you could provide a reproducible example of your issue so there are unit-tests for it.

@aalenliang
Copy link

@fjcaetano for me it works.

@fjcaetano
Copy link
Owner

I'm closing this since PR #61 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants