Tx Doctor / Solana error library / Token account already initialized
Solana error: Token account already initialized (0x6)
An initialize instruction targeted a token account that is already initialized, so the program refused to overwrite it.
Why it happens
- Initializing an account twice would erase its state, so the program blocks it.
- Almost always a double-submit: the create-account instruction ran once already (perhaps the earlier transaction landed), and a retry sends it again.
- The good news: this error means the account you wanted exists — the goal is already achieved.
How to fix it
- Check the token account — it is most likely already created and usable; just run the transfer or swap you actually wanted.
- Do not blindly retry the same transaction; if it was part of a bigger flow, re-run only the remaining steps.
- Developers: skip initialize if the account is already initialized, or use idempotent ATA creation which tolerates this case.
What it looks like in the logs
Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: custom program error: 0x6 RPC simulation: Transaction simulation failed: Error processing Instruction: custom program error: 0x6 Wallet UI: "Transaction failed" — custom program error 0x6 (6)
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