Invalid Account Discriminator

See original GitHub issue

Getting 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

screenshot

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

6reactions
brandonculvercommented, Sep 7, 2021

I am closing this but in case anyone else wonders. When you run metaplex create_candy_machine it 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.

1reaction
Loque18commented, Oct 14, 2021

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.json

and 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'

Read more comments on GitHub >

github_iconTop 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 >
Unhandled Rejection (Error): Invalid account discriminator #124
whats problem is ?
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found