Common Issues
”No staking contract configured for chain …”
Problem: The SDK has no staking contract for the current chain, or you set a customstaking.contract that doesn’t match.
Solution: Remove the custom override to use chain-aware defaults, or set the correct contract for your network:
Transaction Submits but Explorer URL Points to Wrong Explorer
Problem: Transactions execute successfully buttx.explorerUrl points to the default explorer (Voyager) instead of your preferred one.
Solution: Configure the explorer in your SDK config to use your preferred provider:
React Native Random Values/Text Encoding Issues
Problem: Errors related to random value generation or text encoding in React Native. Solution: Use the React Native setup guide and Metro wrapper, which handles required polyfills and resolver compatibility.- Follow React Native Integration
- Ensure your
metro.config.jsis wrapped withwithStarkzap(...) - Clear Metro cache after dependency changes (
npx expo start -c)
withStarkzap, import polyfills in your entrypoint (e.g. index.js or App.tsx):
Account Not Deployed Error
Problem: Getting errors about account not being deployed when trying to execute transactions. Solution: Ensure the account is deployed before executing transactions:Privy Signer Backend Not Responding
Problem: Privy signer fails with network errors or timeouts. Solution:- Verify your backend endpoint is accessible
- Ensure the endpoint accepts POST requests with
{ walletId, hash } - Check that the endpoint returns
{ signature }in the correct format - Verify CORS settings if calling from a browser
Cartridge Connection Fails
Problem: Cartridge wallet connection doesn’t work or popup doesn’t appear. Solution:- Ensure
@cartridge/controlleris installed - Check that you’re calling
connectCartridgein a browser environment - Verify network configuration matches Cartridge’s supported networks
- Check browser console for Cartridge-specific errors
Bridge Token Loading Fails
Problem:sdk.getBridgingTokens() throws an error or returns no tokens.
Solution:
- Verify the SDK chain config is correct (
SN_MAINvsSN_SEPOLIA) and matches your intended environment - Confirm network access to the token API endpoint used by the SDK
- Install required optional deps for the chains you use:
- Ethereum routes:
ethers - Solana routes:
@solana/web3.js(and Hyperlane packages for Solana bridge operations)
- Ethereum routes:
OFT Bridge Fails with LayerZero API Key Error
Problem: You see an error like:OFT bridging requires a LayerZero API key. Set "bridging.layerZeroApiKey"...
Solution:
- Set
bridging.layerZeroApiKeyinnew StarkZap({ ... }) - Use a mainnet route for OFT/OFT-migrated bridge flows
Bridge Deposit Fails with Chain Mismatch
Problem: Deposit fails with errors indicating token chain and external wallet chain do not match. Solution:- Ensure the selected
BridgeToken.chainmatches the connected external wallet type - Ensure external wallet network and Starknet network pairing is valid (mainnet with mainnet, testnet with testnet)
- Recreate connected external wallets with
ConnectedEthereumWallet.from(...)/ConnectedSolanaWallet.from(...)after network switch
Amount Arithmetic Errors
Problem: Getting errors when performing arithmetic on amounts. Solution: Ensure amounts have compatible decimals and symbols:Transaction Fails in Preflight but Not in Execution
Problem: Preflight simulation shows errors, but transaction would succeed. Solution: Preflight uses the current state, which may differ from execution time. This is normal - preflight is a best-effort check. Always handle transaction failures gracefully:TypeScript Type Errors
Problem: TypeScript complains about type mismatches. Solution: Ensure you’re using the correct types:Network Configuration Issues
Problem: SDK can’t connect to the network or wrong network is used. Solution: Verify your network configuration:Fee Estimation Fails
Problem:estimateFee() throws errors.
Solution:
- Ensure the account is deployed
- Verify the calls are valid
- Check that you have sufficient balance for fees
- Try using
preflight()first to catch call errors
Getting More Help
If you’re still experiencing issues:- Check the API Reference for detailed method signatures
- Review the Examples for working code samples
- Ask for help in the Starknet Discord community
- Browse the Starknet community forum
Reporting Issues
If you find a bug or have a feature request:- Check if the issue is already reported
- Create a detailed issue report with:
- SDK version
- Runtime environment (Node.js, browser, React Native)
- Steps to reproduce
- Expected vs actual behavior
- Error messages and stack traces