FixesUpdated 23 Oct 20261 min read

Anchor error 3007 (0xbbf): AccountOwnedByWrongProgram

The fix

An account belongs to a different program than expected. The common case is a Token-2022 token passed where the original Token program is expected, or the reverse.

What the error means

AnchorError caused by account: <name>. Error Code: AccountOwnedByWrongProgram. Error Number: 3007. Error Message: The given account is owned by a different program than expected.

An account belongs to a different program than expected. The common case is a Token-2022 token passed where the original Token program is expected, or the reverse.

Where it comes fromAnchor framework
Code3007 (0xbbf)

How to fix it

  1. Check the token's program in an explorer: Token or Token-2022.
  2. Use an app or instruction that supports that token program.
  3. Make sure the associated token account was created under the same program as the mint.

If that is not it

  • If the account does not exist at all, the error is 3012.

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

Why do Token-2022 tokens cause this?

Their accounts are owned by the Token-2022 program, not the original Token program.

What is 0xbbf?

Anchor error 3007, AccountOwnedByWrongProgram.

Anchor error 3007 (0xbbf): AccountOwnedByWrongProgram | Jumpbit