Evan Conrad
Evan Conrad

Reputation: 4419

Why do I get a "0x1004" when trying to deploy my solana anchor IDL?

When I try to deploy an IDL with anchor, I get a cryptic "Custom Error 0x1004" message. What does this mean:?

$ anchor idl init --provider.cluster testnet --filepath ./target/idl/myprogram.json sa3BafcCxwD6G3tUbvTcvnCD28sCXhpasauLtpw9HdA
Error: Error processing Instruction 0: custom program error: 0x1004

Upvotes: 3

Views: 3032

Answers (1)

Evan Conrad
Evan Conrad

Reputation: 4419

0x1004 is hexadecimal for 4100, or the DeclaredProgramIdMismatch error.

So somewhere in your program, you're declaring a different program id than the one you deployed with:

declare_id!("some_other_program_id"); // this is not your program id!

Upvotes: 7

Related Questions