Closed Martin2037 closed 2 months ago
update: I think the supportedOrientations is the main reason?
Any update ?
Any update ? 任何更新 ?
No updates yet, bro... I've been actively looking for a solution. I've checked all the source code about modal in webview, but I think the code is fine, so I'm guessing it's a problem with react-native?.....
@Titozzz
The sample repo that you provided does not use react-native-webview
at all, other than declaring it as a node dependency.
The sample repo that you provided does not use
react-native-webview
at all, other than declaring it as a node dependency.
This is the weirdest thing - as soon as I install react-native-webview and open a modal, it crashed. And get this, I haven't even declared a webview in my code!
Since it is not being used, it's unlikely that RNW itself is the culprit, but rather might be an issue in a particular version of some other common dependency between RNW and another of your installed packages.
Compare your yarn.lock or package-lock.json before and after installing react-native-webview
, and see which other dependencies are being pulled in. That may give you a clue as to which package might be leading to your troubles with the modal.
Hi @hramos thanks for the insight!
Im using yarn, and there's no big differences in the dependencies after installing react-native-webview
:
escape-string-regexp@2.0.0
invariant@2.2.4
react-native-webview
Those are all the differences before - after installing 🤔
Bug description: react-native-webview + modal = crash example:
To Reproduce: https://github.com/Martin2037/rn-modal-crash
Expected behavior: Do not crash
Screenshots/Videos: Environment:
Just run the following commands to reproduce this weird bug.👇 cd ios RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
After that, start up the project again. It'll compile just fine, no errors. But as soon as you click the button to open the modal, bam! The whole thing crashes.