@solana/kit · Codecs

Solana error #8078019

CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE

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

Message

Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].

Placeholders (codecDescription, hexZeroValue, expectedSize) are filled from the error’s context. Paste the base64 argument below to see the real values.

What it means

Encoding and decoding bytes: wrong sizes, out-of-range numbers, enum discriminators, sentinels, invalid strings.

What to do

  • Match the codec exactly to the on-chain layout: integer width, endianness, prefix sizes and option encoding.
  • EXPECTED_DECODER_TO_CONSUME_ENTIRE_BYTE_ARRAY usually means the decoder is for a different account version.

Decode it locally instead

npx @solana/errors decode -- 8078019 '<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__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE) lets you branch on it.

Decode another error

Try: