Solana error codes › Anchor Framework

Anchor Framework error codes

Errors that the Anchor framework itself returns (codes 100 to 5999), for any program built with Anchor. Program-specific errors start at 6000.

Anchor Framework: InstructionFallbackNotFound

The program received an instruction discriminator it does not recognise.

What to do: The client and the deployed program usually disagree: an outdated IDL or SDK, or the transaction is sent to the wrong program ID. Regenerate the client from the current IDL.

Anchor Framework: ConstraintMut

An account marked `mut` in the program was passed as read-only.

What to do: Mark that account as writable in the instruction (isWritable: true), or use the client generated from the program's IDL.

Anchor Framework: ConstraintRaw

A custom `constraint = ...` check on one of the accounts returned false.

What to do: Read the program logs: Anchor prints the account name that failed. Check that account's state against the constraint in the program source.

Anchor Framework: ConstraintSeeds

A PDA passed to the instruction does not match the address derived from the seeds in the program.

What to do: Derive the PDA with exactly the same seeds, in the same order and encoding, and with the program ID of the program being called.

Anchor Framework: ConstraintAddress

An account does not match the fixed address required by an `address = ...` constraint.

What to do: Pass the exact account the program expects (often a config, mint or program account).

Anchor Framework: AccountDiscriminatorNotFound

The account has no data, so Anchor cannot read its 8-byte discriminator.

What to do: The account usually does not exist yet or was closed. Initialise it first, and check you are on the right cluster.

Anchor Framework: AccountDiscriminatorMismatch

The account's 8-byte discriminator belongs to a different account type than the one the instruction expects.

What to do: Pass an account of the expected type. This also happens after a program changes its account layout and the client still uses an old address or IDL.

Anchor Framework: AccountOwnedByWrongProgram

An account is owned by a different program than the one the instruction expects.

What to do: Check you passed the right address, for example a Token-2022 account where a classic SPL Token account is expected, or the reverse.

Anchor Framework: AccountNotInitialized

The program expected an account that is already initialised, but it is empty.

What to do: Create or initialise the account first (for example the associated token account or the program's state account), and check the cluster (mainnet or devnet).

HexCodeError
0x64100InstructionMissing
8 byte instruction identifier not provided
0x65101InstructionFallbackNotFound
Fallback functions are not supported
The program received an instruction discriminator it does not recognise.
0x66102InstructionDidNotDeserialize
The program could not deserialize the given instruction
0x67103InstructionDidNotSerialize
The program could not serialize the given instruction
0x3e81000IdlInstructionStub
The program was compiled without idl instructions
0x3e91001IdlInstructionInvalidProgram
Invalid program given to the IDL instruction
0x3ea1002IdlAccountNotEmpty
IDL account must be empty in order to resize
0x5dc1500EventInstructionStub
The program was compiled without `event-cpi` feature
0x7d02000ConstraintMut
A mut constraint was violated
An account marked `mut` in the program was passed as read-only.
0x7d12001ConstraintHasOne
A has_one constraint was violated
0x7d22002ConstraintSigner
A signer constraint was violated
The name points to a permission check: the wrong signer or owner account was passed.
0x7d32003ConstraintRaw
A raw constraint was violated
A custom `constraint = ...` check on one of the accounts returned false.
0x7d42004ConstraintOwner
An owner constraint was violated
0x7d52005ConstraintRentExempt
A rent exemption constraint was violated
0x7d62006ConstraintSeeds
A seeds constraint was violated
A PDA passed to the instruction does not match the address derived from the seeds in the program.
0x7d72007ConstraintExecutable
An executable constraint was violated
0x7d82008ConstraintState
Deprecated error, no longer used
0x7d92009ConstraintAssociated
An associated constraint was violated
0x7da2010ConstraintAssociatedInit
An associated init constraint was violated
0x7db2011ConstraintClose
A close constraint was violated
0x7dc2012ConstraintAddress
An address constraint was violated
An account does not match the fixed address required by an `address = ...` constraint.
0x7dd2013ConstraintZero
Expected zero account discriminant
0x7de2014ConstraintTokenMint
A token mint constraint was violated
0x7df2015ConstraintTokenOwner
A token owner constraint was violated
0x7e02016ConstraintMintMintAuthority
A mint mint authority constraint was violated
0x7e12017ConstraintMintFreezeAuthority
A mint freeze authority constraint was violated
0x7e22018ConstraintMintDecimals
A mint decimals constraint was violated
0x7e32019ConstraintSpace
A space constraint was violated
0x7e42020ConstraintAccountIsNone
A required account for the constraint is None
0x7e52021ConstraintTokenTokenProgram
A token account token program constraint was violated
0x7e62022ConstraintMintTokenProgram
A mint token program constraint was violated
0x7e72023ConstraintAssociatedTokenTokenProgram
An associated token token program constraint was violated
0x7e82024ConstraintMintGroupPointerExtension
A mint group pointer extension constraint was violated
0x7e92025ConstraintMintGroupPointerExtensionAuthority
A mint group pointer extension authority constraint was violated
0x7ea2026ConstraintMintGroupPointerExtensionGroupAddress
A mint group pointer extension group address constraint was violated
0x7eb2027ConstraintMintGroupMemberPointerExtension
A mint group member pointer extension constraint was violated
0x7ec2028ConstraintMintGroupMemberPointerExtensionAuthority
A mint group member pointer extension authority constraint was violated
0x7ed2029ConstraintMintGroupMemberPointerExtensionMemberAddress
A mint group member pointer extension member address constraint was violated
0x7ee2030ConstraintMintMetadataPointerExtension
A mint metadata pointer extension constraint was violated
0x7ef2031ConstraintMintMetadataPointerExtensionAuthority
A mint metadata pointer extension authority constraint was violated
0x7f02032ConstraintMintMetadataPointerExtensionMetadataAddress
A mint metadata pointer extension metadata address constraint was violated
0x7f12033ConstraintMintCloseAuthorityExtension
A mint close authority extension constraint was violated
0x7f22034ConstraintMintCloseAuthorityExtensionAuthority
A mint close authority extension authority constraint was violated
0x7f32035ConstraintMintPermanentDelegateExtension
A mint permanent delegate extension constraint was violated
0x7f42036ConstraintMintPermanentDelegateExtensionDelegate
A mint permanent delegate extension delegate constraint was violated
0x7f52037ConstraintMintTransferHookExtension
A mint transfer hook extension constraint was violated
0x7f62038ConstraintMintTransferHookExtensionAuthority
A mint transfer hook extension authority constraint was violated
0x7f72039ConstraintMintTransferHookExtensionProgramId
A mint transfer hook extension program id constraint was violated
0x9c42500RequireViolated
A require expression was violated
0x9c52501RequireEqViolated
A require_eq expression was violated
0x9c62502RequireKeysEqViolated
A require_keys_eq expression was violated
0x9c72503RequireNeqViolated
A require_neq expression was violated
0x9c82504RequireKeysNeqViolated
A require_keys_neq expression was violated
0x9c92505RequireGtViolated
A require_gt expression was violated
0x9ca2506RequireGteViolated
A require_gte expression was violated
0xbb83000AccountDiscriminatorAlreadySet
The account discriminator was already set on this account
0xbb93001AccountDiscriminatorNotFound
No 8 byte discriminator was found on the account
The account has no data, so Anchor cannot read its 8-byte discriminator.
0xbba3002AccountDiscriminatorMismatch
8 byte discriminator did not match what was expected
The account's 8-byte discriminator belongs to a different account type than the one the instruction expects.
0xbbb3003AccountDidNotDeserialize
Failed to deserialize the account
0xbbc3004AccountDidNotSerialize
Failed to serialize the account
0xbbd3005AccountNotEnoughKeys
Not enough account keys given to the instruction
The name points to a balance check: an account holds less than the instruction needs.
0xbbe3006AccountNotMutable
The given account is not mutable
0xbbf3007AccountOwnedByWrongProgram
The given account is owned by a different program than expected
An account is owned by a different program than the one the instruction expects.
0xbc03008InvalidProgramId
Program ID was not as expected
0xbc13009InvalidProgramExecutable
Program account is not executable
0xbc23010AccountNotSigner
The given account did not sign
The name points to a permission check: the wrong signer or owner account was passed.
0xbc33011AccountNotSystemOwned
The given account is not owned by the system program
0xbc43012AccountNotInitialized
The program expected this account to be already initialized
The program expected an account that is already initialised, but it is empty.
0xbc53013AccountNotProgramData
The given account is not a program data account
0xbc63014AccountNotAssociatedTokenAccount
The given account is not the associated token account
0xbc73015AccountSysvarMismatch
The given public key does not match the required sysvar
0xbc83016AccountReallocExceedsLimit
The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit
0xbc93017AccountDuplicateReallocs
The account was duplicated for more than one reallocation
0x10044100DeclaredProgramIdMismatch
The declared program id does not match the actual program id
0x10054101Deprecated
The API being used is deprecated and should no longer be used
0x10064102ZeroCopyTypeMismatch
The given account is not zero-copy initialized
0x13885000TryingToInitPayerAsProgramAccount
Trying to initialize the payer as a program account

Decode an error

Free, no sign-up, nothing to connect. Works offline from a bundled list; we do not look anything up on-chain.

Swapping a token you do not know? A free Rugsight check shows mint and freeze authority, Token-2022 extensions, holder concentration and liquidity before you trade.

Source: solana-idls@1.2.1. Data: program error lists from published IDLs (solana-idls 1.2.1, MIT) and the System, SPL Token, Token-2022 and Associated Token Account source code, snapshot 2026-11-16. Programs can be upgraded and add or change errors; the failing program's current IDL is the final word.