Custom program error

0x66

Appears in logs as custom program error: 0x6. Defined by 2 programs: SPL Token, System. Check which program failed in your logs.

Which one is yours?
The log line Program <id> failed: custom program error: 0x6 names the program that returned the code. Match that id to the program below. Anchor programs also print Error Code: … Error Number: … right above the failure.
SPL TokenTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA

AlreadyInUse

“Already in use”

You tried to initialise a token account or mint that is already initialised.

Common causes

  • Running InitializeAccount/InitializeMint twice, often after a retry whose first attempt succeeded.
  • Calling createAssociatedTokenAccount for an ATA that already exists (use the idempotent variant).

How to fix it

  • Use createAssociatedTokenAccountIdempotent which succeeds when the account already exists.
  • Check the account before initialising it.
System11111111111111111111111111111111

NonceNoRecentBlockhashes

“advancing stored nonce requires a populated RecentBlockhashes sysvar”

A durable nonce instruction could not read recent blockhashes from the sysvar.

Common causes

  • Running against a very unusual cluster state (for example an improperly configured local validator).

How to fix it

  • Retry. If it persists on a local validator, restart it with default sysvars.

Decode another error

Try: