Web3: missing revert data in call exception (CALL_EXCEPTION)
The call failed without a reason string, which usually means there is no contract at that address on this chain rather than a failed require. A deployment address from a different network, a proxy that was never initialised, or an ABI that does not match the deployed bytecode all produce it.
Quick fix
Read the commands before running them. Anything that restarts a service, deletes data or changes permissions should be tried on a non-production system first.
# The first question is whether any code exists at the address
cast code 0xContract --rpc-url $RPC_URL | head -c 20
# 0x means nothing is deployed there on this chain
# Then whether the function selector exists in that bytecode
cast call 0xContract "totalSupply()(uint256)" --rpc-url $RPC_URL
// An ABI mismatch fails the same way: regenerate it from the deployed source
// and check the address came from the right deployment file
const c = new ethers.Contract(address, abi, provider);
console.log(await provider.getNetwork());
# A proxy returns code but forwards to an implementation that may be unset
cast storage 0xProxy 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc --rpc-url $RPC_URL
# Custom errors are revert data the ABI cannot decode, a different case
cast run 0xTxHash --rpc-url $RPC_URL
How to diagnose Web3 errors
Web3 errors are unusually terse because the EVM reports failure without explanation by default. execution reverted means a require or revert triggered. The reason string is present in the return data but most libraries discard it. Nonce errors reflect the strict sequential ordering of transactions per account, so a stuck transaction blocks every one behind it.
If the quick fix above does not resolve it, work through these steps. They apply to this whole class of error, not just to this one message, which is usually what saves the time.
- Simulate before sending:
eth_callagainst the same block returns the revert reason string that a submitted transaction hides. - Use a transaction tracer (Tenderly, Foundry's
cast run, or a node'sdebug_traceTransaction) to see the exact opcode and contract where execution reverted. - For nonce errors, query the account's pending nonce (
eth_getTransactionCountwith thependingtag) rather than tracking it locally. - To replace a stuck transaction, resend with the same nonce and a materially higher gas price: most nodes require at least a 10% increase.
- Check the chain ID matches the network you intend. Signing for the wrong chain produces confusing rejection messages.
Tools worth reaching for
cast (Foundry)eth_call simulationTenderly / block explorer tracerdebug_traceTransaction
Authoritative references
Primary documentation for this error, worth reading before applying any fix in production.
Related Web3 errors
- ethers v6: Cannot read properties of undefined (reading 'Web3Provider')ethers v6 removed the providers, utils and constants namespaces, so v5 code such as…
- MetaMask Tx Signature: User denied transaction signature (4001)Code 4001 is the EIP-1193 "user rejected" error: the person clicked Reject or closed the…
- Solidity: CompilerError: Stack too deep. Try compiling with --via-irThe EVM can only reach the top 16 slots of its stack, and the function the error points at…
- Web3: already known / ALREADY_EXISTS when sending a transactionThe node already holds a transaction with this exact hash in its pool, so the resend is…
- Web3: cannot estimate gas; transaction may fail or may require manual gas limitThe node ran the transaction against current state and it reverted, so no gas figure could be…
- Web3: could not detect network (event="noNetwork", code=NETWORK_ERROR)ethers asks the endpoint for its chain id before it will do anything else, and that call…
- Web3: execution revertedThe smart contract reverted. Solidity custom errors or revert strings often explain the exact…
- Web3: gas required exceeds allowance (0)The node simulated the transaction and found the sender cannot cover it, so the allowance it…
Browse other categories
- HTTP 494xx client errors, 5xx server errors, redirects, headers and protocol problems.
- JavaScript 42npm resolution, async pitfalls, hydration, memory limits and runtime type…
- Database 41Connections, deadlocks, constraints, replication and memory limits.
- AI 35Rate limits, context windows, GPU memory and model-serving failures.
- Network 35Refused connections, timeouts, resets, MTU problems and port exhaustion.
- Python 35Imports, virtual environments, encoding, concurrency and dependency conflicts.
- Kubernetes 34CrashLoopBackOff, ImagePullBackOff, OOMKilled, RBAC, scheduling and storage.
- Docker 27Daemon connectivity, disk space, image pulls, ports and architecture mismatches.
- System 26Disk space, systemd units, file descriptors, OOM killer and scheduled jobs.
- Cloud 25IAM permissions, quotas, service limits and credential failures.
- Security 25JWT validation, CSRF, OAuth grants, SELinux, SSH host keys and CSP.
- TLS 24Untrusted authorities, expiry, hostname mismatch, chains and cipher negotiation.
Something missing or wrong?
This entry is maintained by hand. If the fix is out of date, incomplete, or you have a better one, email a correction and it will be reviewed.