@solana/kit · Instruction errors (on-chain)

Solana error #4615021

INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED

Appears as Solana error #4615021; Decode this error by running `npx @solana/errors decode -- 4615021 '…'`

Message

Program other than the account's owner changed the size of the account data

What it means

Kit's typed wrappers around the runtime's InstructionError variants. The same errors exist in the legacy format; see the linked page for causes and fixes.

What to do

  • The index in the context is the failing instruction's position in the transaction.
  • INSTRUCTION_ERROR__CUSTOM carries the program's own error code; this site decodes it.

This wraps the on-chain error AccountDataSizeChanged, which has its own page with causes and fixes.

Decode it locally instead

npx @solana/errors decode -- 4615021 '<base64 context>'

In development, import from @solana/kit as usual and the full message is thrown. In production the message is stripped to keep bundles small; the error object still carries error.context with the same values this page decodes, and isSolanaError(err, SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED) lets you branch on it.

Decode another error

Try: