Error Codes in Aptos
This page catalogs common errors encountered in the Aptos blockchain and explains how to resolve them wherever possible. As with all software, the code itself is the source of truth for error handling and will always contain entries not found here. Instead, this matrix aims to help you address those errors most typically found, misunderstood, or both.
For the sources of these errors, see:
Help us update this list by sending pull requests containing the errors you encounter. If you don't know how to resolve the error, as described int the Action column, simply leave it blank.
Move Virtual Machine (VM)
|A function that is being called isn't present on the network being used
|Check that your dependencies on-chain have the same version
|We don't want the default value to be valid.
|The transaction has a bad signature.
|Submit a new transaction with a new signature
|Bad account authentication key.
|Submit a new transaction with a new signature, check that the account matches the authentication key and hasn't been rotated
|Sequence number is too old.
|Submit a new transaction with a newer sequence number from the account
|Sequence number is too new.
|Submit a new transaction with a new signature
|Insufficient balance to pay minimum transaction fee.
|Fund the account with more APT to pay for the gas fee
|The transaction has expired.
|Submit a new transaction with an expiration time further in the future
|The sending account does not exist.
|Create the account prior to sending the transaction again
|This write set transaction was rejected because it did not meet the requirements for one.
|This write set transaction cannot be applied to the current state.
|Length of program field in raw transaction exceeded max length.
|The transaction is too large for a single transaction; if this is a package publish, try to break it into multiple packages
|This script is not in our allowlist of scripts.
|Transaction is trying to publish a new module.
|Max gas units submitted with transaction exceeds max gas units bound in VM.
|Decrease the max gas amount in the transaction below the maximum value in the gas schedule
|Max gas units submitted with transaction not enough to cover the intrinsic cost of the transaction.
|Increase the max gas amount above the minimum value in the gas schedule
|Gas unit price submitted with transaction is below minimum gas price set in the VM.
|Increase the gas unit price below the minimum gas unit price in the gas schedule
|Gas unit price submitted with the transaction is above the maximum gas price set in the VM.
|Decrease the gas unit price below the maximum gas unit price in the gas schedule
|Gas specifier submitted is either malformed (not a valid identifier), or does not refer to an accepted gas specifier.
|The sending account is frozen.
|Unable to deserialize the account blob.
|The currency info was unable to be found.
|The account sender doesn't have permissions to publish modules.
|The sending account has no role.
|The transaction's chain_id does not match the one published on-chain.
|Verify that your chain ID matches the chain ID for your network
|The sequence number is too large and would overflow if the transaction were executed.
|The gas currency is not registered as a TransactionFee currency.
|The feature requested is intended for a future Aptos version instead of the current one.
|The number of secondary signer addresses is different from the number of secondary public keys provided.
|Verify the multi-agent or multi-ed25519 secondary signer addresses match the secondary public keys
|There are duplicates among signers, including the sender and all the secondary signers.
|Remove any duplicate signers
|The sequence nonce in the transaction is invalid (too new, too old, or already used).
|There was an error when accessing chain-specific account information.
|the module publisher is not the account that will eventually hold the module.
|Confirm the module address in the move contract matches the sender of the transaction
|Reported when a struct has zero fields.
|The sender is trying to publish two modules with the same name in one transaction.
|Confirm every module has a unique name
|The sender is trying to publish a module that breaks the compatibility checks.
|Confirm your new modules being published don't break backwards compatibility
|The updated module introduces a cyclic dependency (i.e., A uses B and B also uses A).
|Check for loops in your module dependencies in the modules being published
|Cannot mark the module itself as a friend.
|Confirm no module has itself marked as a friend in the modules being published
|Cannot declare modules outside of account address as friends.
|Confirm all friends are in the same account address in the modules being published
|Cannot declare modules that this module depends on as friends.
|Check friend declarations of the modules being published
|The updated module introduces a cyclic friendship (i.e., A friends B and B also friends A).
|Check friend declarations of the modules being published
|A phantom type parameter was used in a non-phantom position.
|Confirm phantom types are used only with generics
|Loops are too deeply nested.
|Check for many nested loops
|Failed to resolve type due to linking being broken after verification.
|We tried to access a resource that does not exist under the account.
|Check the contract and possibly change it to handle resources that don't exist
|We tried to create a resource under an account where that resource already exists.
|Check the contract and possibly change it to handle resources that already exist
|A reserved status to represent an unknown vm status. This is std::u64::MAX, but we can't pattern match on that, so put the hardcoded value in.
|This may be due to the function has not been published on chain or by trying to call an invalid function as the result of either an incorrect account address, module name, or function name. This might not happen locally if the sources are available locally but have yet to be published on-chain.
|There are many reasons, but you should check your account addresses, module names, and function names to determine that they're correct and published
Move Standard Library (stdlib)
|Caller specified an invalid argument (HTTP: 400).
|An input or result of a computation is out of range (HTTP: 400).
|The system is not in a state where the operation can be performed (HTTP: 400).
|Request not authenticated due to missing, invalid, or expired authentication token (HTTP: 401).
|The client does not have sufficient permission (HTTP: 403).
|A specified resource is not found (HTTP: 404).
|Concurrency conflict, such as read-modify-write conflict (HTTP: 409).
|The resource that a client tried to create already exists (HTTP: 409).
|Out of gas or other forms of quota (HTTP: 429).
|Request cancelled by the client (HTTP: 499).
|Internal error (HTTP: 500).
|Feature not implemented (HTTP: 501).
|The service is currently unavailable. Indicates that a retry could solve the issue (HTTP: 503).
|Account already exists.
|Account does not exist.
|Create the account first
|Sequence number exceeds the maximum value for a u64.
|Provide a smaller sequence number
|The provided authentication key has an invalid length.
|Check your authentication key; it should be a 32-byte vector
|Cannot create account because address is reserved.
|Transaction exceeded its allocated max gas.
|Increase the max gas amount
|Specified current public key is not correct.
|Confirm the public key matches the account
|Specified proof of knowledge required to prove ownership of a public key is invalid.
|Check your proof of knowledge in key rotation to ensure it has proper signatures
|The caller does not have a digital-signature-based capability to call this function.
|Confirm you have the capability for the called functions
|The caller does not have a valid rotation capability offer from the other account.
|Confirm the account being rotated is correct
|Address to create is not a valid reserved address for Aptos framework.
|Specified scheme required to proceed with the smart contract operation - can only be ED25519_SCHEME(0) OR MULTI_ED25519_SCHEME(1).
|Confirm the transaction was signed correctly when creating the account
|Abort the transaction if the expected originating address is different from the originating address on-chain.
|Confirm you are rotating the correct account's key
|The signer capability doesn't exist at the given address.
|Confirm the address is correct
|Address of account which is used to initialize a coin
CoinType doesn't match the deployer of module.
|Create the coin using a
CoinType in the same account creating the coin.
CoinType is already initialized as a coin.
CoinType hasn't been initialized as a coin.
|Create the coin with
CoinType first before using it
|Account already has
CoinStore registered for
|Account hasn't registered
|Register the account for the
|Not enough coins to complete transaction.
|Transfer less coins, or acquire more coins prior to the transfer
|Cannot destroy non-zero coins.
|Coin amount cannot be zero.
|Don't burn coins or conduct other actions with zero coins
|CoinStore is frozen. Coins cannot be deposited or withdrawn.
|Account is frozen for this token; talk to the coin owner
|Cannot upgrade the total supply of coins to different implementation.
|Name of the coin is too long.
|Coin name must be less than or equal to 32 characters
|Symbol of the coin is too long.
|Coin symbol must be less than or equal to 10 characters
|The token has balance and cannot be initialized.
|There isn't any collection under this account.
|Cannot find collection in creator's account.
|The collection already exists.
|Exceeds the collection's maximal number of token_data.
|Insufficient token balance.
|Cannot merge the two tokens with different token IDs.
|Exceed the token data maximal allowed.
|No burn capability.
|TokenData already exists.
|TokenData not published.
|TokenStore doesn't exist.
|Cannot split token to an amount larger than its amount.
|The field is not mutable.
|Not authorized to mutate.
|Token not in the token store.
|User didn't opt-in direct transfer.
|Cannot withdraw 0 token.
|Cannot split a token that only has 1 amount.
|No mint capability
|The collection name is too long.
|The NFT name is too long.
|The URI is too long.
|Cannot deposit a token with 0 amount.
|Cannot burn 0 token.
|Withdraw proof expires.
|Token is not burnable by owner.
|Token is not burnable by creator.
|Reserved fields for token contract. Cannot be updated by user.
|URI too short.
|Token offer doesn't exist.