You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
App crashes during web3auth initialization if the configured RPC is not responsive #127
import*asWebBrowserfrom'@toruslabs/react-native-web-browser';importEncryptedStoragefrom'react-native-encrypted-storage';importWeb3Auth,{ChainNamespace,WEB3AUTH_NETWORK,}from'@web3auth/react-native-sdk';import{EthereumPrivateKeyProvider}from'@web3auth/ethereum-provider';constchainConfig={chainNamespace: ChainNamespace.EIP155,chainId: ''whatever',rpcTarget: 'an rpc that does not respond or overall crashes',// Avoid using public rpcTarget in production.// Use services like Infura, Quicknode etcdisplayName: 'Ethereum Sepolia Testnet',blockExplorerUrl: 'https://sepolia.etherscan.io',ticker: 'ETH',tickerName: 'Ethereum',decimals: 18,logo: 'https://cryptologos.cc/logos/ethereum-eth-logo.png',};constethereumPrivateKeyProvider=newEthereumPrivateKeyProvider({config: {
chainConfig,},});constscheme='xyz.piopio.app';constredirectUrl=`${scheme}://auth`;exportconstauth=newWeb3Auth(WebBrowser,EncryptedStorage,{// clientId: WEB3AUTH_CLIENT_ID,clientId:
'your id',
redirectUrl,network: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,// or other networksprivateKeyProvider: ethereumPrivateKeyProvider,enableLogging: true,});
Activity
bdtren commentedon Sep 3, 2025
In my case, I'm using react-native 0.76.6 (bare flow) and the app crashed because of
@toruslabs/react-native-web-browser.So my workaround is: