react-native-examples icon indicating copy to clipboard operation
react-native-examples copied to clipboard

IOS : RangeError: Maximum call stack size exceeded.

Open dingsq820 opened this issue 2 years ago • 5 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.

dingsq820 avatar Apr 28 '23 01:04 dingsq820

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.]

tantiancai avatar Apr 28 '23 02:04 tantiancai

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,
});

dingsq820 avatar May 10 '23 01:05 dingsq820

Any fix for this issue?

DamperX avatar Jul 12 '23 07:07 DamperX

image

DamperX avatar Jul 12 '23 07:07 DamperX

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

seawish369 avatar Jul 26 '23 18:07 seawish369

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.

ignaciosantise avatar May 30 '24 13:05 ignaciosantise