Anchor
AccountNotAssociatedTokenAccount
“The given account is not the associated token account”
The account passed is not the canonical associated token account for (owner, mint).
Common causes
- Passing a manually created token account instead of the ATA, or deriving the ATA with the wrong token program.
How to fix it
- Pass
getAssociatedTokenAddressSync(mint, owner, false, tokenProgram).