What the error means
Transaction contains a duplicate instruction (N) that is not allowed
The transaction includes the same compute budget instruction twice, typically because an SDK added its own compute unit limit or price and the app added another.
| Where it comes from | Solana runtime (transaction error) |
| Code | DuplicateInstruction |
How to fix it
- Remove one of the SetComputeUnitLimit or SetComputeUnitPrice instructions so each appears once.
- If you build transactions with a protocol SDK, check whether it already adds compute budget instructions before adding yours.
- Rebuild, simulate and resend.
If that is not it
- If no compute budget instruction is duplicated, check the instruction index in the error to see which one repeats.
More fixes: how to decode any Solana error code and why Solana transactions fail.
Source
Error text and code from Solana SDK transaction and instruction error definitions (anza-xyz/solana-sdk), read on 24 October 2026.
