react-native-webview / react-native-webview

React Native Cross-Platform WebView
https://github.com/react-native-community/discussions-and-proposals/pull/3
MIT License
6.31k stars 2.96k forks source link

Webview shows blank white page #3410

Open SorooshDeveloper opened 2 months ago

SorooshDeveloper commented 2 months ago

Bug description:

When implementing example in my project webview shows empty screen and with no errors! webview library works ok in my project when i test it with other examples.

"react-native-react-bridge": "^0.11.2",
"react-dom": "^18.2.0",
"react-native": "0.71.18",
"react": "18.2.0",
"react-native-webview": "^13.8.6",

Screenshot 2024-04-23 at 3 12 26 PM

robpearmain commented 1 month ago

I am getting the same problem after the app has been inactive

swrobel commented 1 month ago

Android, iOS, or both? Simulator, real devices, or both? Which devices?

robpearmain commented 1 month ago

So far on an iOS device (iPhone and iPad), not on android

My workaround is on the event

onContentProcessDidTerminate

I set the url to null using state and then set it to the correct url after a short timer, it then reloads correctly

On Fri, 3 May 2024 at 21:03, Stefan Wrobel @.***> wrote:

Android, iOS, or both? Simulator, real devices, or both? Which devices?

— Reply to this email directly, view it on GitHub https://github.com/react-native-webview/react-native-webview/issues/3410#issuecomment-2093683961, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACJB2GK6VZANQH6DZS44U3ZAPUQBAVCNFSM6AAAAABGUWZPGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTGY4DGOJWGE . You are receiving this because you commented.Message ID: @.*** com>

robpearmain commented 1 month ago

It would be good to have maybe a option to reload on onContentProcessDidTerminate with a maximum retries

On Fri, 3 May 2024 at 21:03, Stefan Wrobel @.***> wrote:

Android, iOS, or both? Simulator, real devices, or both? Which devices?

— Reply to this email directly, view it on GitHub https://github.com/react-native-webview/react-native-webview/issues/3410#issuecomment-2093683961, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACJB2GK6VZANQH6DZS44U3ZAPUQBAVCNFSM6AAAAABGUWZPGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTGY4DGOJWGE . You are receiving this because you commented.Message ID: @.*** com>

jonluca commented 1 month ago

We're seeing this as well when the first screen the user sees is the webview. Is there a race condition somewhere? Not sure what its going on internally to make it render blank