reown-com/react-native-examples

TypeError: Cannot read property 'map' of undefined

anietieasuquo opened this issue · 11 comments

Hi,

I cloned this repository and ran the Dapp at dapps/v2Explorer, but got an error when running on ios (both device and simulator).

Error: TypeError: Cannot read property 'map' of undefined.
From what I see in the logs, this seems to come from SignClient because of {"context": "client"} SignClient Initialization Failure.

Also got an initial error: Error fetching all wallets.

Below is the output of npx react-native info;

System:
    OS: macOS 13.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 67.72 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.17.1/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.1/bin/npm
    Watchman: 2023.03.13.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: Chipmunk 2021.2.1 Patch 2 Chipmunk 2021.2.1 Patch 2
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 17.0.3 - <JAVA PATH>
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.2 => 0.71.2

Can you try to reproduce this?

Hi @anietieasuquo! Thanks for reaching out. Did you add the .env file with your project_id as it is defined here?

@ignaciosantise yes I replaced the .env vars with my details.

Cool, just to make sure, did you create a new .env file with your values? Also, are you using the default relay url?
Screen Shot 2023-03-27 at 13 15 36

@anietieasuquo can you also check that the device has internet connection?

@ignaciosantise Yes, I created a new .env with my values and yes I'm using the default relay URL.
I did a full clean of the project and ran pod update and pod install again. And now, I still get the same error as before, but the wallets are fetched. When I click on Trust Wallet for example, it opens the wallet and I get a message saying that WalletConnect was disconnected and I should go back and reconnect everytime. Meanwhile the same error as before is still there: TypeError: Cannot read property 'map' of undefined.

And yes the device has internet connection.

@ignaciosantise any update on this? Have you been able to reproduce it?

Hi @anietieasuquo, i wasn't able to reproduce it. But i'll keep trying! Could you provide a step list of what you are doing? Or upload a video with the complete flow

@ignaciosantise a video will be hard to come up with. But see below the basic steps.

  1. Clone this repository
  2. cd into dapps/v2explorer
  3. Copy .env with cp .env.example .env
  4. Update .env with valid project ID
  5. Run yarn install
  6. cd into ios folder and run pod install and cd back
  7. Run yarn start
  8. Open project in xcode and run build
  9. Run project on device

@ignaciosantise Do you think the project status on https://cloud.walletconnect.com/app could contribute to the issue?
image

Mmm the draft project should work too. Can you upload a picture with the error? And also provide more info, as i understood, the wallets are loading and the modal is opening right? When exactly does the error appear?

Hey @anietieasuquo, any news about the issue?