FixesUpdated 23 Oct 20261 min read

Anchor error 3012 (0xbc4): AccountNotInitialized

The fix

The program expected an account to exist but it has not been created yet, such as a token account, pool position or user state account.

What the error means

AnchorError caused by account: <name>. Error Code: AccountNotInitialized. Error Number: 3012. Error Message: The program expected this account to be already initialized.

The program expected an account to exist but it has not been created yet, such as a token account, pool position or user state account.

Where it comes fromAnchor framework
Code3012 (0xbc4)

How to fix it

  1. Create the missing account first, often an associated token account for the token you receive.
  2. Check you are on the right network; an account created on devnet does not exist on mainnet.
  3. Some protocols need an existing account with a balance before an action, for example a wrapped SOL account.

If that is not it

  • If the account exists, 3007 (owned by wrong program) or 3003 (failed to deserialize) is more likely.

More fixes: how to decode any Solana error code and why Solana transactions fail.

Source

Error text and code from Anchor framework error codes (coral-xyz/anchor v0.30.1 lang/src/error.rs), read on 24 October 2026.

Questions people ask

What is error 0xbc4?

Anchor error 3012, AccountNotInitialized.

Where have you seen it?

Creating a Meteora DLMM pair without an existing wrapped SOL account.