Invalid Account Discriminator
See original GitHub issueGetting invalid account discriminator when trying to get the candy store state. This is the devnet, I know its setup and working correctly. I was able to mint via command line and see the nft in the dev minter wallet.
Is this an ID error?
The only ids in my cache file are:
"uuid": "CC8R65",
"config": "CC8R653SGidJkTFEoWyzq8GB... <-- intentionally truncated
}
I originally tried using the uuid as the REACT_APP_CANDY_MACHINE_ID, but the app did not like that. I then just copied the config as the ID as well and everything seemed to work until it tried to fetch the state.
I have not modifed the base app other than the .env, I have tried this on both windows and macos

Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
What does "invalid account discriminator" mean in Anchor?
This error happens if you try to to fetch something as myAccountType , but it's actually a pubkey for some other account, like...
Read more >account in anchor_lang - Rust - Docs.rs
An attribute for a data structure representing a Solana account. ... If it doesn't match, an invalid account was given, and the account...
Read more >HDL Error: "TheComponent Discriminator ... - My Oracle Support
HDL Error: "TheComponent Discriminator CostAllocationAccountV3 Is Invalid. The Line With Instruction METADATA Must Include A Discriminator ...
Read more >pda - Anchor - Manually setting program account discriminator
I'm trying to initialize a new pda account in an instruction, but not all of the seeds are available in the context (can't...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am closing this but in case anyone else wonders. When you run
metaplex create_candy_machineit returns and ID in the command prompt. That is what goes in the candy machine id in the .env file. The candy machine config is what is in the cache.Its strange, metaplex is able to do everything including mint without that ID since the cache does not save it.
It might be a good idea to document the create_candy_machine and set_start_date commands somewhere.
I already solved it, for anyone else struggling with this error, you guys have to run create_candy_machine with the CLI
ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts create_candy_machine --keypair ~/.config/solana/devnet.jsonand for those of you that are also struggling with realease date issues run the following command, dont forget to change the date to yours
ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts update_candy_machine --keypair ~/.config/solana/devnet.json --date 7 'Oct 2021 00:00:00 GMT'