metaplex-foundation / metaplex

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

[Bug]: Transaction simulation failed: Error processing Instruction 0: Program failed to complete #2111

Closed FixitFelix0 closed 2 years ago

FixitFelix0 commented 2 years ago

Which package is this bug report for?

candy machine cli

Issue description

Howdy again!

I have an issue, I've already reached out here a couple of times, we even brought in an outside dev to help and after 4-5 hours of going through everything again we've come up blank.

Seem to be having an issue with writing indices. It stops at 97.

I have verify assets, I run upload "arweave-sol", Bundlr does its thing. Upload complete. The it start to write the indices, which goes well for a bit and then start failing.

I've check the temp files and seems that it stops at 97/500. 96 and below are all onChain: true, 97 and above are all onChain: false.

which is weird -we've made sure all programs are upto date (had to update solana) -checked the json metadata files, cmconfig file. -checked image file sizec -withdrew the fund from one, made another candy machine with brand new clone from git -yarn install & yarn bootstrap -using custom rpc (quicknode - on build plan, not launch)

we have exhausted all possible ideas on this one

Any help we could get would be amazing! basically its all on chain until nft 97, everything after that is set to false. I've also used search here and in the discord to look up all common terms in my errors and still nothing. I've also read thrugh the docs so much I feel almost know them off by heart :D

Any help that could be offered to solve this would be good, this puzzle is wrinkling my brain!

Command

ts-node .\packages\cli\src\candy-machine-v2-cli.ts upload 
\-e mainnet-beta 
\-k C:\Users\user\Documents\Projects\ZQW\Akey1.json 
\-cp C:\Users\user\Documents\Projects\ZQW\ZQWcmconfig.json 
\-r https://solana-mainnet.quiknode.pro32/ 
.\ZQW\assets\

Relevant log output

Failed writing indices 465-472: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Program failed to complete
Transaction simulation failed: Error processing Instruction 0: Program failed to complete 
    Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ invoke [1]
    Program log: Instruction: AddConfigLines
    Program log: panicked at 'attempt to subtract with overflow', src/lib.rs:706:43
    Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ consumed 15111 of 200000 compute units
    Program failed to complete: BPF program panicked
    Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ failed: Program failed to complete
Translating error SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Program failed to com
    at Connection.sendEncodedTransaction (C:\Users\Z\Documents\Projects\ZQW\js\node_modules\@solana\web3.js\src\connection.ts:3964:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Connection.sendRawTransaction (C:\Users\Z\Documents\Projects\ZQW\js\node_modules\@solana\web3.js\src\connection.ts:3921:20)
    at async sendAndConfirmRawTransaction (C:\Users\Z\Documents\Projects\ZQW\js\node_modules\@solana\web3.js\src\util\send-and-confirm-raw-transa:21)
    at async Provider.send (C:\Users\Z\Documents\Projects\ZQW\js\node_modules\@project-serum\anchor\src\provider.ts:114:18)
    at async Object.rpc [as addConfigLines] (C:\Users\Z\Documents\Projects\ZQW\js\node_modules\@project-serum\anchor\src\program\namespace\rpc.ts
    at async addConfigLines (C:\Users\Z\Documents\Projects\ZQW\js\packages\cli\src\commands\upload.ts:563:22)
    at async PromisePoolExecutor.handler (C:\Users\Z\Documents\Projects\ZQW\js\packages\cli\src\commands\upload.ts:601:7)
    at async PromisePoolExecutor.waitForTaskToFinish (C:\Users\Z\Documents\Projects\ZQW\js\node_modules\@supercharge\promise-pool\dist\promise-po.js:208:9)
    at async PromisePoolExecutor.process (C:\Users\Z\Documents\Projects\ZQW\js\node_modules\@supercharge\promise-pool\dist\promise-pool-executor.
{
  logs: [
    'Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ invoke [1]',
    'Program log: Instruction: AddConfigLines',
    "Program log: panicked at 'attempt to subtract with overflow', src/lib.rs:706:43",
    'Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ consumed 15111 of 200000 compute units',
    'Program failed to complete: BPF program panicked',
    'Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ failed: Program failed to complete'
  ]
}

Operating system

Windows 10

Priority this issue should have

High (immediate attention needed)

Check the Docs First

serverhan commented 2 years ago

Faced similar problem, any solutions there?

ykondrashyn commented 2 years ago

I encountered with the same problem, turns out it was caused by too long asset name, please look at https://github.com/kevinfaveri/solana-candy-factory/issues/43#issuecomment-946839209 Also, check out js/packages/cli/src/helpers/constants.ts for max size of the field

FixitFelix0 commented 2 years ago

I thought so too, however the first 96 work perfect and the rest have exactly the same amount of characters. Its super weird, I've been scratching my head about this one for a couple of days now.

bonlemuel commented 2 years ago

I encountered with the same problem, turns out it was caused by too long asset name, please look at kevinfaveri/solana-candy-factory#43 (comment) Also, check out js/packages/cli/src/helpers/constants.ts for max size of the field

You have helped me saved allot of time. Thanks Bro!

drunckj commented 2 years ago

I encountered with the same problem, turns out it was caused by too long asset name, please look at kevinfaveri/solana-candy-factory#43 (comment) Also, check out js/packages/cli/src/helpers/constants.ts for max size of the field

Faced the same today, it can be fixed easily by checking field limits from js/packages/cli/src/helpers/constants.ts. Just make sure you don't exceed the limits mentioned inside the file.

petunmar commented 2 years ago

Had the same problem today although all strings were legal length. Changing the cache key (-c flag in the upload command) worked for me.

github-actions[bot] commented 2 years ago

This Issue has received no activity for 30 days. We will close it in 2 days, please reopen if you are still experiencing this issue.

VR-VIDEO commented 2 years ago

if any one still have problem after make shorter name, make sure u delete cache