metaplex-foundation / metaplex

A directory of what the Metaplex Foundation works on!
https://metaplex.com
Apache License 2.0
3.32k stars 6.26k forks source link

Cannot Mint from CMv2 due to "custom program error: 0x3c" #1853

Closed felixxcheng closed 2 years ago

felixxcheng commented 2 years ago

Which package is this bug report for?

candy machine ui

Issue description

Attempted to mint via Devnet using CMv2 and candy-machine-ui. Result is a fail to mint.

I created a fresh CMv2 to isolate the issue.
Candy Machine ID: XxNFGXuCvBunPrRNrHdNCsor9S64PfWVn4C9LHFAeBg

The most recent minting attempt was this transaction: https://solscan.io/tx/2iKnbDsmcaZ1hsaVAouDfbF96vMpCD6w4sBYJVka5z76AArtgXq9ukJqxo3qveiuNDMjgBkUHgGzHdH9gwADR5ZQ?cluster=devnet

While I don't fully understand what is occurring with the mint, I can see "Program returned error: custom program error: 0x3c"

Could someone please advise how to fix this?
Initially I thought it was the candy-machine-ui throwing an error but now I can see that this is not being completed on the blockchain.

Thank you kindly

Command

No response

Relevant log output

No response

Operating system

Windows 10

Priority this issue should have

Medium (should be fixed soon)

Check the Docs First

stegaBOB commented 2 years ago

The 0x3c error is "DuplicateCreatorAddress: No duplicate creator addresses" from the token metadata program. It looks like you may have put the same creator multiple times in your json file for index 0 (which is what the candy machine pulls from to get the creator addresses). Can you check and see if that's the case? Thanks

felixxcheng commented 2 years ago

stegaBOB, sir, you are a genius. Thank you so much.

I created a fresh CMv2 on devnet on a fresh keypair to make sure nothing conflicted, carrying out your exact advice of eliminating the duplicate Creators. It worked perfectly.

For further reference, is there some Encylopedia where I can find what these Program Error codes mean?

Thank you again!

stegaBOB commented 2 years ago

One of our amazing engineers, @samuelvanderwaal, made quite a nice tool to check errors. Here's a link to it: https://github.com/samuelvanderwaal/wtf-is.

The only way you find what the errors mean right now is by looking at the actual rust program code unfortunately. What Sam did is take all of that and put it together in one nice tool.