You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Invariant Violation: Failed to call into JavaScript module method WebViewMessageHandler1.onMessage(). Module has not been registered as callable. Bridgeless Mode: false. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, HMRClient, AppRegistry, RCTEventEmitter.
Steps to reproduce
react-native@0.71.8
Install "react-native-webview": "11.26.1",
"@callstack/repack": "~3.4.0",
Run app in Android Device
Render the Html with post message.
Clicking on the button getting the Above Error.
Note: Working as expected in iOS
React Native version
0.71.8
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
None
Build type
Debug/Release mode
Device
Android simulator, Android Device
Device model
No response
Sample HTML code to Render <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> </head> <body style=" display: flex; justify-content: center; flex-direction: column; align-items: center; " > <button onclick="sendDataToReactNativeApp()" // Crash happening when we click the button style=" padding: 20; width: 200; font-size: 20; color: white; background-color: #6751ff; " > Send Data To React Native App </button> <script> const sendDataToReactNativeApp = async () => { window.ReactNativeWebView.postMessage('Data from WebView / Website'); }; </script> </body> </html> Actual Result:
App is crashing on accessing onMessage props.
Expected Result:
App should not crash and post message should receive in omeesage event.
The text was updated successfully, but these errors were encountered:
I've tested this locally on android although on newest version of react-native and @callstack/repack and it's working as expected and no error is occuring. Please try upgrading first and see if that resolves your issue.
Closing this as this doesn't seem Re.Pack related and more like a react-native issue itself.
Description
Invariant Violation: Failed to call into JavaScript module method WebViewMessageHandler1.onMessage(). Module has not been registered as callable. Bridgeless Mode: false. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, HMRClient, AppRegistry, RCTEventEmitter.
Steps to reproduce
react-native@0.71.8
Install "react-native-webview": "11.26.1",
"@callstack/repack": "~3.4.0",
Run app in Android Device
Render the Html with post message.
Clicking on the button getting the Above Error.
Note: Working as expected in iOS
React Native version
0.71.8
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
None
Build type
Debug/Release mode
Device
Android simulator, Android Device
Device model
No response
Sample HTML code to Render
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> </head> <body style=" display: flex; justify-content: center; flex-direction: column; align-items: center; " > <button onclick="sendDataToReactNativeApp()" // Crash happening when we click the button style=" padding: 20; width: 200; font-size: 20; color: white; background-color: #6751ff; " > Send Data To React Native App </button> <script> const sendDataToReactNativeApp = async () => { window.ReactNativeWebView.postMessage('Data from WebView / Website'); }; </script> </body> </html>
Actual Result:
App is crashing on accessing onMessage props.
Expected Result:
App should not crash and post message should receive in omeesage event.
The text was updated successfully, but these errors were encountered: