WalletConnect / web3modal-react-native

Web3Modal React-Native SDK
https://web3modal.com
Apache License 2.0
43 stars 14 forks source link

[bug] IOS Crashes When Using this package with Webview #150

Closed Martin2037 closed 4 months ago

Martin2037 commented 4 months ago

Description

Environment:

IOS version: 17.2 Simulator: iPhone 15 Pro React-Native version: 0.73.5 (new architecture)

Description:

The application crashes without any error messages when I click the connect button after installing both the Wallet-Connect and react-native-webview packages. The application compiles without any errors. xcode stackšŸ‘‡ e74b3cd0-1ed8-4153-9714-359fa0dead23

Actual behavior: The application crashes without any error messages.

Minimal Reproduction:

I've created a minimal reproduction of this issue. The repository can be found at: https://github.com/Martin2037/rn-modal-crash

Web3Modal SDK version

@web3modal/wagmi-react-native 1.2.0

Output of npx react-native info

System: OS: macOS 14.2.1 CPU: (10) arm64 Apple M1 Pro Memory: 69.55 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.9.0 path: /usr/local/bin/node Yarn: version: 1.22.19 path: /usr/local/bin/yarn npm: version: 9.4.0 path: /usr/local/bin/npm Watchman: version: 2024.01.22.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /Users/zhujunyang/.rubies/ruby-3.3.0/bin/pod SDKs: iOS SDK: Platforms:

Expo Version (if applies)

No response

Steps to reproduce

1态Install both wallet-connect and webview packages. 2态Compile the application 3态Click the connect button.

Snack, code example, screenshot, or link to a repository

https://github.com/Martin2037/rn-modal-crash

opensourcex123 commented 4 months ago

same issue here

Martin2037 commented 4 months ago

@ignaciosantise

Martin2037 commented 4 months ago

need help plz

ignaciosantise commented 4 months ago

@Martin2037 hey, i wasn't able to reproduce the issue with your repository. It seems more of an issue either with the other libs or with your current setup. Can you expand the info about the error?

https://github.com/WalletConnect/web3modal-react-native/assets/25931366/2ad91576-3ba9-42f8-94e4-8d25562d469b

Martin2037 commented 4 months ago

@Martin2037 hey, i wasn't able to reproduce the issue with your repository. It seems more of an issue either with the other libs or with your current setup. Can you expand the info about the error?

simulator.mp4

try to run: RCT_NEW_ARCH_ENABLED=1 bundle exec pod install

crashed with new arch

Martin2037 commented 4 months ago

@ignaciosantise

ignaciosantise commented 4 months ago

@Martin2037 i was able to reproduce the error, but it seems the crash is related with react-native-webview, apparently it doesn't work well with modals. If i remove the webview package, both web3modal sdk and actions-sheet work properly.

Someone opened this issue: https://github.com/react-native-webview/react-native-webview/issues/3336 and you also added your +1 there.

Im closing this as the issue is not from our SDK.