-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android / New Arch] injectJavaScript
and presumably other commands get executed twice
#3305
Comments
@Titozzz was totally wrong here — of course all these methods get called directly with the new arch; and I see no reason why the shared implementation, as it is implemented, could shadow these. react-native-webview/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java Lines 423 to 450 in 6960a19
|
Just ran into this today |
@17Amir17 you may consider to temporarily depend on my fork of the library, https://www.npmjs.com/package/@dr.pogodin/react-native-webview, which has this one and a few other issues fixed, as my PRs into the upstream version are pending the merge for a while now. |
Unfortunately I use this library as a peer dependency, so I'll have work around this in my case :( |
Any progress on this? I see @birdofpreyru submitted a PR to fix this. |
Any update? Still occurs in |
Bug description:
I found that
injectJavaScript
code gets executed twice on Android with the New Arch. It happens because once it gets executed here (as a consequence of that command processing pattern):react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManagerImpl.kt
Line 334 in 6960a19
then another time it gets executed here:
react-native-webview/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java
Lines 444 to 447 in 6960a19
I guess, similar error might be there with other actions handled via that commands pattern.
To Reproduce:
Expected behavior:
Screenshots/Videos:
Environment:
The text was updated successfully, but these errors were encountered: