0

I am following a tutorial to have my own NFT minting site, but I keep running into an error.

Tutorial link is https://youtu.be/35RO0lAEIxE?t=2876

My issue (first line is the command I typed as per the vid):

C:\Users\dark_\Desktop\Sol\metaplex-master>npx ts-node js/packages/cli/src/candy-machine-cli.ts create_candy_machine --env devnet --keypair ~/.config/solana/devnet.json

    C:\Users\dark_\Desktop\Sol\metaplex-master>npx ts-node js/packages/cli/src/candy-machine-cli.ts create_candy_machine --env devnet --keypair ~/.config/solana/devnet.json
wallet public key: 1WTJHpAHH1j7dLyArZmpfoVZVJN4Gnh1jpGSuPTHQCF
Transaction simulation failed: Error processing Instruction 0: custom program error: 0x139 
    Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ invoke [1]
    Program 11111111111111111111111111111111 invoke [2]
    Program 11111111111111111111111111111111 success
    Program log: Custom program error: 0x139
    Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ consumed 20298 of 200000 compute units
    Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ failed: custom program error: 0x139
Translating error SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x139
    at Connection.sendEncodedTransaction (C:\Users\dark_\Desktop\Sol\metaplex-master\js\node_modules\@solana\web3.js\src\connection.ts:3553:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Connection.sendRawTransaction (C:\Users\dark_\Desktop\Sol\metaplex-master\js\node_modules\@solana\web3.js\src\connection.ts:3513:20)
    at async sendAndConfirmRawTransaction (C:\Users\dark_\Desktop\Sol\metaplex-master\js\node_modules\@solana\web3.js\src\util\send-and-confirm-raw-transaction.ts:27:21)  
    at async Provider.send (C:\Users\dark_\Desktop\Sol\metaplex-master\js\packages\cli\node_modules\@project-serum\anchor\src\provider.ts:114:18)
    at async Object.rpc [as initializeCandyMachine] (C:\Users\dark_\Desktop\Sol\metaplex-master\js\packages\cli\node_modules\@project-serum\anchor\src\program\namespace\rpc.ts:19:23) {
  logs: [
    'Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ invoke [1]',
    'Program 11111111111111111111111111111111 invoke [2]',
    'Program 11111111111111111111111111111111 success',
    'Program log: Custom program error: 0x139',
    'Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ consumed 20298 of 200000 compute units',
    'Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ failed: custom program error: 0x139'
  ]
}
C:\Users\dark_\Desktop\Sol\metaplex-master\js\packages\cli\node_modules\@project-serum\anchor\src\error.ts:35
      return new ProgramError(errorCode, errorMsg, errorCode + ": " + errorMsg);
             ^
ProgramError: 313: Number of config lines must be at least number of items available
    at Function.parse (C:\Users\dark_\Desktop\Sol\metaplex-master\js\packages\cli\node_modules\@project-serum\anchor\src\error.ts:35:14)
    at Object.rpc [as initializeCandyMachine] (C:\Users\dark_\Desktop\Sol\metaplex-master\js\packages\cli\node_modules\@project-serum\anchor\src\program\namespace\rpc.ts:23:42)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 313,
  msg: 'Number of config lines must be at least number of items available'
}
Loki-Khan
  • 1
  • 1

1 Answers1

0

Try deleting the .cache file and then reupload your NFT's, then run this command.

Do share some code also so we can understand your problem in detail!

  • I deleted the .cache file. Still no good. I figured it was because it's on Devnet, Devnet may not allow that many NFTs as it's for testing purposes, so I brought the number down to 10. That seemed to do the trick. Btw, when you ask for the code, what exactly do you want me to copy/paste? I can link you to the Github repository if you want. – Loki-Khan Nov 11 '21 at 05:51
  • Yes by default candy machine is configured to upload 26 pairs of png and JSON on devnet for testing purposes. BTW adding a git link or code that is causing the problem at a specific line will help coders to help more efficiently. – Taimoor Malik Nov 12 '21 at 06:44
  • I have a terrible memory and kept forgetting to reply to this. Is there anyway to change it from 26 to a larger number? Also, in case you're interested in the GIT file, this is what I used: https://github.com/metaplex-foundation/metaplex But probably an older version from around the time I made the initial post. I can't seem to find how to pull the older version. :( – Loki-Khan Nov 18 '21 at 04:51
  • You can change it to a larger number by passing your own arweave account id in metaplex>js>packages>cli>src>helpers>constants.ts .... Or by passing your ipfs infura credentials in upload command as mentioned in metaplex>js>packages>cli>src>candy-machine-cli.ts – Taimoor Malik Nov 19 '21 at 07:26
  • Damn! I wasn't expecting a positive response! Thanks a lot, Taimoor! Much appreciated! <3 I'll give that a shot for sure! – Loki-Khan Nov 20 '21 at 17:29