question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

window.ReactNativeWebView is undefined on Android platform, iOS works just fine.

See original GitHub issue

Bug description:

window.ReactNativeWebView is undefined on Android platform, iOS works just fine.

To Reproduce:

Build for both platforms from same project, open Chrome’s DevTool and Safari’s Web Inspector, type window.ReactNativeWebView in the Console section and send it.

Expected behavior:

Webpage JS can call window.ReactNativeWebView.postMessage() on both platform successfully. Further action handled within React Native.

Screenshots/Videos:

Console at the top showing iOS console, bottom is Android console Image showing iOS console at the top, android console at the bottom

Environment:

  • OS: iOS

  • OS version: 14.3

  • react-native version: 0.63.4

  • react-native-webview version: 11.0.2

  • OS: Android

  • OS version: 11

  • react-native version: 0.63.4

  • react-native-webview version: 11.0.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:14

github_iconTop GitHub Comments

2reactions
JmStefanAndroidcommented, Mar 30, 2021

same issue

1reaction
Scarle-tcommented, Jan 22, 2021

@fpena I do aware that the issue may not related to onNavigationStateChange, I just not sure that if having the prop will affect anything, or if I’m doing it wrongly (I’m new to React Native)

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - ReactNativeWebView is Not Recognised
Declare and use the reference value. onLoadEnd() { this.webview.postMessage("yourmessage"); } <WebView ref={webview => (this.webview ...
Read more >
react-native-webview - npm
React Native WebView component for iOS, Android, macOS, and Windows. Latest version: 11.26.0, last published: 17 days ago.
Read more >
How to use WebView in React Native - Educative.io
In this shot, we're going to implement a simple project to see how to work with WebView on React Native and what some...
Read more >
AuthSession - Expo Documentation
AuthSession is the easiest way to add web browser based authentication (for example, browser-based OAuth flows) to your app, built on top of...
Read more >
error cannot read property 'configurations' of undefined. react ...
node_modules/@react-native-community/cli-platform-ios/build/config/index.js ... For Android, the reason it didn't work for me previously might be related to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found