@solana/kit · Invariant violations

Solana error #9900001

INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE

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

Message

Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant

What it means

Internal consistency checks that should never fail in normal use.

What to do

  • These indicate a bug in Kit or in a custom plugin. Report it with a reproduction.

Decode it locally instead

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

Decode another error

Try: