Error message: Solana: The declared program ID does not match the actual program ID
What to do when checking steps fail in devnet
As a programmer working with Blockchain Solana, he often encounters problems in checking the program in Devnet. One of these mistakes you can arise is that the declared program identifier (PID) does not match the actual program identifier.
In this article, we deepen the cause of this problem and give the instructions step by step to solve it.
Problem
When you try to check the Devnet program using the Solana CLI (” ” ” ” command) ‘tool, you can get an error message indicating that the declared PID does not match the actual program identifier. This can happen for several reasons:
- Delivered PID is different from the one used during verification.
- PID or account information has a typo.
- The account used to check is unjust in Devnet.
Solving the problem: Checking the Devnet Program
To resolve this problem, follow the following steps:
Step 1: Check PID used during verification
First, make sure you use the correct PID during verification. You can check your PID as follows:
`Bash
Solana-CLI-Having Grep pid
This command will be run by PID used during inspection.
Step 2: Update PID on Devnet
If you have found PID errors or printed errors, update them so that they match what is used during verification. You can use the following command to update PID:
`Bash
Solana-Cli-up-Pid
Replace
to the real PID and to the identifier of a Devnet verified account.
Step 3: Check your program again
After updating PID, check your program again using the "Solana-Verify" command. This should solve all the problems related to the mismatch of PID:
Bash
Solana-Werify -p
Replace
for updated PID and
the real program identifier used during verification.
Tips to solve problems
- Make sure you use the correct account ID to check.
- Check that PID is not used or used in Devnet.
- If you still have problems, try to update the latest “Verify Solana-Verify”.
Following these steps and solving problems, you should be able to solve the problem of the declared discrepancy of the program identifier during the verification of the program in Devnet.