Anchor
InstructionDidNotDeserialize
“The program could not deserialize the given instruction”
The instruction arguments could not be deserialised with Borsh.
Common causes
- Argument types or order changed in the program but the client still uses the old IDL.
- Passing a number where the program expects a
u64encoded asBN, or vice versa.
How to fix it
- Rebuild and redeploy the IDL, then regenerate the client.
- Check each argument's type against the IDL, especially integers larger than 2^53 which must be
BN.