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

onMessage method cannot receive the message #3370

Closed dhc-lijin closed 2 months ago

dhc-lijin commented 2 months ago

I used webView on page A and page B. This webView is a common component. When I click on the webView content on page A, I will interact with html, receive an onMessage callback, and then jump to page B, open a web view, close b and return to the page. When I click on the same content on page A again, the onMessage method will no longer be executed. What is the reason for this problem?

Environment:

Yummy-sk commented 1 month ago

Hi, I'm struggling with the same problem. For me, this bug only occurs on Android. Can you tell me what the problem is and how you solved it?

web-copilot commented 1 month ago

Hi @dhc-lijin @Yummy-sk I am encountering the same issue for both the platforms. Can you suggest me how can this be fixed?

raviraj-tudip commented 3 weeks ago

Facing same problem, when calling html post request then not able to receive any callback in onMessage. @dhc-lijin for me it was not working for first time also.