Skip to main content
Version: 6.0.0

Error Codes Reference

This page lists common error codes and messages encountered when using TronWeb.

Transaction Errors

ErrorDescriptionSolution
BANDWITH_ERRORInsufficient bandwidthFreeze TRX for bandwidth or ensure account has free bandwidth
CONTRACT_VALIDATE_ERRORTransaction validation failedCheck parameters, account balance, or permissions
CONTRACT_EXE_ERRORContract execution failedCheck energy/fee limit, contract state, and input parameters
SIGERRORSignature verification failedVerify correct private key and transaction data
DUP_TRANSACTION_ERRORDuplicate transactionTransaction already submitted; wait or create a new one
TAPOS_ERRORBlock reference expiredRebuild the transaction with current block reference
TOO_BIG_TRANSACTION_ERRORTransaction too largeReduce transaction data or split into multiple transactions
TRANSACTION_EXPIRATION_ERRORTransaction expiredRebuild and sign the transaction (default expiry: 60 seconds)
NOT_ENOUGH_PERMISSIONMulti-sig threshold not metCollect more signatures before broadcasting

Smart Contract Errors

ErrorDescriptionSolution
OUT_OF_ENERGYEnergy exhaustedIncrease feeLimit, stake more TRX for energy
OUT_OF_TIMEExecution timeoutOptimize contract code, reduce complexity
REVERTContract revertedCheck require()/revert() conditions in contract
JVMStackOverFlowStack overflowReduce recursion depth in contract
OUT_OF_MEMORYMemory limit exceededReduce memory usage in contract
TRANSFER_FAILEDTRX/token transfer failedCheck recipient address and balance

TronWeb Client Errors

Error MessageDescriptionSolution
Invalid address providedAddress format invalidUse valid base58 or hex address
Invalid issuer address providedSender address invalidSet tronWeb.defaultAddress or provide valid address
Private key does not match addressKey-address mismatchUse the correct private key for the account
Invalid amount providedAmount is not a positive integerProvide a positive integer value (in SUN)
Invalid token ID providedToken ID not foundVerify the token exists on the network
Contract has not been deployedContract address invalidVerify contract deployment and address
Calling a non-contract addressAddress is not a contractCheck the contract address

HTTP API Errors

Status CodeDescriptionSolution
400Bad requestCheck request parameters
404Endpoint not foundVerify Full Node URL and API path
503Node unavailableNode is syncing or down; try another node
Rate limitedToo many requestsReduce request frequency or use API key

Tips for Debugging

  1. Check transaction info — After broadcasting, check the transaction result:

    const info = await tronWeb.trx.getTransactionInfo(txId);
    console.log(info.receipt); // resource consumption
    console.log(info.result); // error message (if failed)
    console.log(info.contractResult); // contract return data
  2. Decode revert reason — For contract reverts:

    const info = await tronWeb.trx.getTransactionInfo(txId);
    if (info.contractResult && info.contractResult[0]) {
    const reason = tronWeb.toUtf8(info.contractResult[0]);
    console.log('Revert reason:', reason);
    }
  3. Use confirmed endpoints — For reliable reads, use confirmed (solidity) node:

    const confirmedBalance = await tronWeb.trx.getBalance(address, { confirmed: true });