Cap-go / capacitor-inappbrowser

Capacitor plugin in app browser with urlChangeEvent
MIT License
57 stars 37 forks source link

openWebView on Android with an URL that responds with a redirect doesn't work. #110

Closed jackobo closed 1 month ago

jackobo commented 3 months ago

I'm calling openWebView with an URL that eventually responds with a redirect. On Android the initial URL is blocked and the webview ends up in a blank screen. On iOS the same URL works fine. Also on Android 7 works but on Android 13 and 14 it doesn't. Can you please give me a hint ? And let me know if I can provide more information. 10x

jackobo commented 3 months ago

I figured out what is the issue. There is a certificate chain incomplete issue on the server for which I want to open the URL in the Webview. Again this happens only on newer versions of Android. I figured out about this by forking the project and I override the onReceivedSslError of the WebViewClient and I ignored the SSL errors and it worked after I did that. Do you think would be appropriate/usefull to add an ignoreSslErrors option to the openWebView method ? I can create a pull request for that.

riderx commented 1 month ago

I did accepted a PR yesterday for that : https://github.com/Cap-go/capacitor-inappbrowser/pull/129 tell me if that helps