IncorrectProgramId
A transaction passed an account that is owned by a different program than the one trying to read or modify it.
Common causes
- Wrong account passed to instruction. The account you passed is owned by a different program. For example, passing a token mint account where a token account is expected.
- Account created by a different program. The account was initialized by program A, but you are calling program B which expects to own the account.
- PDA derived with wrong program ID. The Program Derived Address was computed with the wrong program ID, so the resulting address points to an account owned by a different program.
How to fix
- Verify account ownership. Use getAccountInfo to check the
ownerfield of the account. It must match the program you are calling. - Check PDA derivation. Ensure
PublicKey.findProgramAddressSync(seeds, programId)uses the correctprogramId. - Use the right account. If the account is owned by a different program, you need to find or create the correct account owned by the target program.
FAQ
What is account ownership in Solana?
Every account on Solana has an owner field — the program ID that is allowed to modify the account’s data. Only the owner program can write to the account. The System Program owns all new wallets.
Can I transfer ownership of an account?
Only the current owner program can reassign ownership via the assign instruction. Most programs do not expose this functionality.
Error text variants
-
IncorrectProgramId -
Incorrect program id -
incorrect program id for instruction
Updated: