reown-com/react-native-examples

IOS : RangeError: Maximum call stack size exceeded.

dingsq820 opened this issue · 6 comments

code: core.pairing.pair({ uri: wcuri })

When pair to the dapp,an error was reported on IOS. Android is fine.
ERROR {"context": "core"} {"context": "core/relayer"} [RangeError: Maximum call stack size exceeded.]

It seems that if the [walletconnect/core] package is v2.7.1, this error will be reported.

It happend even in sample wallet project.

https://github.com/WalletConnect/react-native-examples/tree/main/wallets/rn_cli_wallet_068_5

Reproduction:

  • Delete the content about "@walletconnect/xxx" in yarn.lock
  • Execute yarn install command to automatically obtain the latest version
  • Start the iOS app
  • When pairing, the console will prompt the following error
    ERROR {"context": "core"} {"context": "core/relayer"} [RangeError: Maximum call stack size exceeded.]

https://github.com/WalletConnect/react-native-examples/tree/main/wallets/rn_cli_wallet_068_5
Removing【BigInt】 from the following code provided in the example will not report this error

const TextEncodingPolyfill = require('text-encoding');
const BigInt = require('big-integer');

Object.assign(global, {
  TextEncoder: TextEncodingPolyfill.TextEncoder,
  TextDecoder: TextEncodingPolyfill.TextDecoder,
  BigInt,
});

Any fix for this issue?

@DamperX the above solution can fix this issue, I have tried

Im closing this as is not happening in the latest versions of web3wallet + core.

Feel free to open a new one if you are able to reproduce it using the newest versions.