react-native-webview icon indicating copy to clipboard operation
react-native-webview copied to clipboard

[#3289] Android: Trigger `onError` callback on asset loading errors

Open birdofpreyru opened this issue 1 year ago • 4 comments

Here is my PR for #3289:

  • Avoids using the deprecated version of onReceivedError for onError implementation on Android.
  • Fires onError callback, if provided, for asset loading errors, in addition to the primary source loading errors.
  • Does not alter the logic of other related callbacks (onLoad, onLoadEnd, etc.); i.e. onError signals triggered for page assets do not prevent onLoad and onLoadEnd to be fired for the page itself, if that was loaded — thus, the page is signaled to have been loaded successfully, even if its assets failed to load, and that is just the original behavior of those signals before my PR.

Can we merge it, please? :)

birdofpreyru avatar Jan 16 '24 00:01 birdofpreyru

Note to self: Maybe release as breaking as we will trigger more errors

Titozzz avatar Jan 29 '24 01:01 Titozzz

When will these changes be added to a new version of react-native-webview? This might actually solve a problem where my page eternally loads because of assets failing to load, and onLoadEnd never triggers.

gmartpad avatar Mar 22 '24 06:03 gmartpad

Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

github-actions[bot] avatar May 22 '24 00:05 github-actions[bot]

The issue is still present in the mainstream react-native-webview. It is resolved, however, in my fork — @dr.pogodin/react-native-webview — a step ahead of the upstream.

birdofpreyru avatar May 22 '24 10:05 birdofpreyru

Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

github-actions[bot] avatar Jul 22 '24 00:07 github-actions[bot]