Bug description:
The onError() implementation for Android (see below), in its native layer, overrides the version of onReceivedError() method deprecated in Android API 23 (thus, since 2015 β this library is really well-maintained π€£ )
|
@Override |
|
public void onReceivedError( |
|
WebView webView, |
|
int errorCode, |
|
String description, |
|
String failingUrl) { |
and unlike the new version of the method the old one is fired for the main resource errors only β you get the error only if it failed to load the URI passed into the source itself, if it failed to load assets it depends upon (like JS scripts, CSS sheets, and other stuff required by the main resource) you won't get any error, even if it breaks the page and deserves an attempt to reload the page, or some other error-handling in your host app.
P.S.: As this is one is a sensitive problem for myself, I'll fix it and create PR shortly. If anybody is willing to say thanks for that, I am accepting donations via GitHub.Sponsors π
To Reproduce:
Expected behavior:
Screenshots/Videos:
Environment:
- OS:
- OS version:
- react-native version:
- react-native-webview version:
Bug description:
The
onError()implementation for Android (see below), in its native layer, overrides the version ofonReceivedError()method deprecated in Android API 23 (thus, since 2015 β this library is really well-maintained π€£ )react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewClient.java
Lines 211 to 216 in 6960a19
and unlike the new version of the method the old one is fired for the main resource errors only β you get the error only if it failed to load the URI passed into the
sourceitself, if it failed to load assets it depends upon (like JS scripts, CSS sheets, and other stuff required by the main resource) you won't get any error, even if it breaks the page and deserves an attempt to reload the page, or some other error-handling in your host app.P.S.: As this is one is a sensitive problem for myself, I'll fix it and create PR shortly. If anybody is willing to say thanks for that, I am accepting donations via GitHub.Sponsors π
To Reproduce:
Expected behavior:
Screenshots/Videos:
Environment: