@solana/kit · React hooks

Solana error #9000002

REACT__SUBSCRIPTION_CLOSED_WITHOUT_ERROR

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

Message

The subscription closed in an error state but did not report an error.

What it means

Misuse of the Kit React hooks.

What to do

  • Check that the wallet account supports the feature the hook needs and that the chain is supported.

Decode it locally instead

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

Decode another error

Try: