Tx Doctor / Solana error library / Uninitialized account state
Solana error: Uninitialized account state (0x9)
An operation hit a token account or mint that was never initialized, so there was no state to act on.
Why it happens
- The account exists on chain but its initialize instruction never ran — often because the transaction that was supposed to initialize it failed earlier in the same atomic bundle.
- Reading balances or transferring from an uninitialized account is impossible, so the program rejects early.
- With Associated Token Accounts this is rare — the ATA program initializes on creation — but hand-created token accounts skip that step.
How to fix it
- Create/initialize the token account first (or let the swap or transfer instruction create it in the same transaction), then retry.
- In a wallet, simply opening the token's page usually triggers account creation.
- Developers: prepend a create-account instruction for any account your flow assumes exists.
What it looks like in the logs
Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: custom program error: 0x9 RPC simulation: Transaction simulation failed: Error processing Instruction: custom program error: 0x9 Wallet UI: "Transaction failed" — custom program error 0x9 (9)
One failure, three places it shows up: the raw transaction log, the RPC simulation error, and the wallet's short message. Match on the code, never on the wording.
What this means for your funds
Solana transactions are atomic: if any instruction fails, every state change in that transaction is reverted, so token balances end exactly where they started. The network fee is still charged, because validators did the work of executing and rejecting it. A failed transaction never moves your tokens to someone else.
Seeing this error right now? Paste your transaction signature and get the exact instruction, program and code that failed.
Diagnose my transaction