WalletConnect / web3modal-react-native

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

Error after installation #7

Closed taibenvenuti closed 1 year ago

taibenvenuti commented 1 year ago

After following the expo installation instructions in the docs and pressing the Connect button, the modal appears for a fraction of a second and then I get error message:

ERROR {"context": "client"} undefined is not a function

And this pops up:

error

I reported this issue in the discord channel, and was asked to open an issue about it. Please let me know if there is any other information you need from me and I'll be happy to provide it.

ignaciosantise commented 1 year ago

Hey @taibenvenuti 👋 Can you provide your expo and react-native versions? Also, can you check if adding expo-crypto and the shim solves the problem? Steps here

taibenvenuti commented 1 year ago

Expo package version is 48.0.15 Output from yarn expo --version is 0.7.1 though. React Native version is 0.71.7

As for the shim and expo-crypto, i had that already. As mentioned earlier I did follow the installation intructions for expo to the letter :)

taibenvenuti commented 1 year ago

/Adding these as well in case they can be useful

ignaciosantise commented 1 year ago

@taibenvenuti thanks for the context. I've just created an expo example and followed the steps, and it's working for me in Android and iOS 🤔

Which version of android are you using? is it a real device or an emulator?

taibenvenuti commented 1 year ago

@ignaciosantise that's interesting to know. I will try again on a brand new project then. I am using Expo Go app on Android 12 device (at least I can't find the android version, but the Build Number starts with 12), starting the server without the --android flag, otherwise it doesn't work for me.

taibenvenuti commented 1 year ago

@ignaciosantise I just started a fresh project, followed the instructions, and it works!!

I am not really sure what I have on my existing project that prevents it from working but I will now migrate the code to this new project and keep checking along the way. Thanks for the help, and sorry for the time wasted!

If I find out what was the real issue, i'll post on here.

ignaciosantise commented 1 year ago

@taibenvenuti good to know it works!