This repository has been archived by the owner on May 1, 2024. It is now read-only.
[Bug] WebView.Navigated event not fired when no internet available on iOS. #12312
Labels
a/webview
e/4 🕓
4
in-progress
This issue has an associated pull request that may resolve it!
p/iOS 🍎
t/bug 🐛
Milestone
Description
WebView.Navigated
NOT fired on iOS when no internet connection is available.Steps to Reproduce
WebView.Navigating
andWebView.Navigated
events.WebView.Navigated
is never called.Expected Behavior
On iOS, when loading a url in the
WebView
, if there is no internet connection available, theWebView
should fire aNavigated
event withWebNavigationResult.Failure
.Since this is observed behavior on Android, I expected iOS to behave the same way.
Actual Behavior
The
Navigated
event is never fired for this error case.Basic Information
Workaround
No suitable workaround found yet. I know where the bug is and how it can be fixed.
iOS WkWebView requires a delegate
WkNavigationDelegate
to handle various callbacks from theWkWebView
.The
WkNavigationDelegate
has 2 methods to handle errors:DidFailNavigation(WKWebView webView, WKNavigation navigation, NSError error)
DidFailProvisionalNavigation(WKWebView webView, WKNavigation navigation, NSError error)
Only one of them has been implemented as can be seen here: WkWebViewRenderer source code
For now the solution would be to implement the other method. The implementation can be copied from
DidFailNavigation
The text was updated successfully, but these errors were encountered: