metaplex-foundation / metaplex

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

Rejected via websocket { InstructionError: [ 4, { Custom: 6008 } ] } Transaction failed: Custom program error: 0x1778 #1597

Closed UwebDevCom closed 2 years ago

UwebDevCom commented 2 years ago

Describe the bug using Devnet for minting some NFTs. Then following by documentation, and mint_one_token which is working fine, and then trying to mint_multipe_tokens and im getting the error :

wallet public key: 6qMuMq9bui4H8qQKX6QLoM7ExMhbaXHGzH25PYEiw1EF Rejected via websocket { InstructionError: [ 4, { Custom: 6008 } ] } Timeout Error caught { err: { InstructionError: [ 4, [Object] ] }, slot: 108870640, confirmations: 0 }

\metaplex\js\packages\cli\src\helpers\transactions.ts:136 throw new Error( ^ Error: Transaction failed: Custom program error: 0x1778 at sendSignedTransaction (\metaplex\js\packages\cli\src\helpers\transactions.ts:136:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async sendTransactionWithRetryWithKeypair (\metaplex\js\packages\cli\src\helpers\transactions.ts:59:26) at async mintV2 (\metaplex\js\packages\cli\src\commands\mint.ts:344:5) at async Command. (\metaplex\js\packages\cli\src\candy-machine-v2-cli.ts:714:16) then trying to run mint_one_token again amd still getting the same error. thanks
marc-lassiter commented 2 years ago

I'm getting the same error but its for _mint_onetoken

My code is: ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts mint_one_token -e devnet -k ~/.config/solana/devnet.json -c a3

Error:

Rejected via websocket { InstructionError: [ 4, { Custom: 6008 } ] }
Timeout Error caught {
  err: { InstructionError: [ 4, [Object] ] },
  slot: 108970120,
  confirmations: 0
}
(node:734536) UnhandledPromiseRejectionWarning: Error: Transaction failed: Custom program error: 0x1778
    at sendSignedTransaction (/home/ubuntu/metaplex-foundation/metaplex/js/packages/cli/src/helpers/transactions.ts:136:19)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async sendTransactionWithRetryWithKeypair (/home/ubuntu/metaplex-foundation/metaplex/js/packages/cli/src/helpers/transactions.ts:59:26)
    at async mintV2 (/home/ubuntu/metaplex-foundation/metaplex/js/packages/cli/src/commands/mint.ts:344:5)
    at async Command.<anonymous> (/home/ubuntu/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:714:16)
kelvin2180 commented 2 years ago

+1

marc-lassiter commented 2 years ago

I figured it out. I didn't have authority to mint the token, at least in my case.

victorajayi commented 2 years ago

I figured it out. I didn't have authority to mint the token, at least in my case.

how did you check this?

marc-lassiter commented 2 years ago

I figured it out. I didn't have authority to mint the token, at least in my case.

how did you check this?

For whatever reason, I had to change my solTreasuryAccount in config.json address to the address I was using to mint the token. So solTreasuryAccount = mint address and it worked. I tried to change the solTreasuryAccount to the creator address of the token (in 0.json) and that is what brought up this error.

victorajayi commented 2 years ago

that still doesn't work for me. I tried minting from candymachine ui and always get the message "Error failed, please try again!" when I try to mint using "mint_one_token" command I get this error message

wallet public key: 4nKrvRmb6B3feKxRM8UgedJ6cBADv7qHJde6D4sF9zuu REST error for 5wLredTVy1J6rQt2R6KyMPioH5kHQyE8QDgzgL9N5RHYLc4qSBiThvdoKxfcn9zWM3w6TB7mpjD8spDWXDghJ8aG { confirmationStatus: 'processed', confirmations: 0, err: { InstructionError: [ 4, [Object] ] }, slot: 117115278, status: { Err: { InstructionError: [Array] } } } Timeout Error caught { InstructionError: [ 4, { Custom: 6008 } ] } C:\Users\victo\OneDrive\Desktop\solana\metaplex-master\js\packages\cli\src\helpers\transactions.ts:136 throw new Error( at sendSignedTransaction (C:\Users\victo\OneDrive\Desktop\solana\metaplex-master\js\packages\cli\src\helpers\transactions.ts:136:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) s\transactions.ts:136:19) at async sendTransactionWithRetryWithKeypair (C:\Users\victo\OneDrive\Desktop\solana\metaplex-master\js\packages\cli\src\helpers\transactions.ts:59:26) kages\cli\src\helpers\transactions.ts at async mintV2 (C:\Users\victo\OneDrive\Desktop\solana\metaplex-master\js\packages\cli\src\commands\mint.ts:344:5) s:344:5) at async Command. (C:\Users\victo\OneDrive\Desktop\solana\metaplex-master\js\packages\cli\src\candy-machine-v2-cli.ts:714:16) ndy-machine-v2-cli.ts:714:16)

dericlima commented 2 years ago

I had this issue today, my problem was that my wallet had insufficient funds. I had 0.07 SOL when trying to mint one token. After sending 1 SOL to the wallet the error was gone. A friend of mine mentioned that it's good to have at least 0.1 SOL in the wallet before trying to mint_tokens. I don't how the minimum amount that you need to have. Maybe someone here can give us some clue....

ProCoreNFT commented 2 years ago

I was having the same issue, Its a balance issue. Make sure your Treasury account is set properly. you can run the show command.

ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts show -e mainnet-beta -k ~/.config/solana/devnet.json -c pName" And this will pull the information from the candy machine itself.

It will look like this.


authority:  (Redacted) Treasury Wallet 
wallet:  (Redacted) Treasury Wallet <- Generally the same. 
tokenMint:  null 
uuid:  A8iFMC 
price:  250000000 
itemsAvailable:  100 
itemsRedeemed:  11 
goLiveDate:  2022-01-15T22:00:00.000Z 
symbol: 
sellerFeeBasisPoints:  1200 
creators: 
(Redacted)uKfVA at 50 % 
(Redacted)2Tpx3 at 50 % 
maxSupply:  0 
retainAuthority:  true 
isMutable:  true 
hidden settings:  null 
No end settings detected 
No captcha for this candy machine 
no whitelist settings```

Make sure you have have enough sol in your wallet to cover at least 1 mint, then it will go though and you only pay gas.
0cv commented 2 years ago

Not clear whether it was a balance issue, I had more than 2 SOL on the devnet and it failed. But I nonetheless added 2 SOL through airdrop as per the suggestion above, which brought me to 4 something. Then I retried and it worked. But the fee is very very small as shown below, far below my previous balance of 2 SOL. So, whether it's failing because apparently 2 SOL is too little, or something else? I'd bet on the latter, but not sure why trying a few times eventually does the trick.

image

luckoo-platform commented 2 years ago

Yes it happened to me too, then after i added 1 more sol, suddenly it succeed. idk why.

Zaouat commented 2 years ago

Hello, guys, I have this problem when I want to mint in the devnet network

`REST error for 4m7NAz1NoocVaSuftVxYrxjoPRj1jnMXs3yvwKPp7bjxM4gVuanier9dB78F7fmXRzexu3R5CoVYrGSdzXCaoXp4 {confirmationStatus: 'processed', confirmations: 0, err: {…}, slot: 114395225, status: {…}} connection.ts:274

Rejected via websocket {InstructionError: Array(2)}InstructionError: Array(2)0: 41: {Custom: 6019}length: 2[[Prototype]]: Array(0)[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()defineGetter: ƒ defineGetter()defineSetter: ƒ defineSetter()lookupGetter: ƒ lookupGetter()lookupSetter: ƒ lookupSetter()proto: (...)get proto: ƒ proto()set proto: ƒ proto() mint.ts:191 Error: Transaction failed: Custom program error: 0x1783 at sendSignedTransaction (connection.ts:197:19)`

kecoje commented 2 years ago

Did you manage to solve it? In my case it turned out i left the captcha (gatekeeper) on so it couldn't mint in the command line.

summerplaybook commented 2 years ago

adding sol and retrying also worked for me!

kcc0 commented 2 years ago

Facing this issue right now. Added SOL to the seller wallet but nothing seems to be working. This is on the mainnet. Any help here is appreciated. Could this be an issue with the token wallet?

Screenshot 2022-03-04 at 11 01 40 AM
stegaBOB commented 2 years ago

Everyone else's error seems to be resolved. As for @kcc0, this issue has been fixed as of yesterday. Please try to mint again.

masnasri-a commented 2 years ago

image im trying this night error like that

kcc0 commented 2 years ago

Everyone else's error seems to be resolved. As for @kcc0, this issue has been fixed as of yesterday. Please try to mint again.

Can confirm ser! Thank you. Please close 🙏

SuhairiSubhi commented 2 years ago

Hello guys, got the same error but with IO image

Grandmasterg84 commented 2 years ago

image im trying this night error like that

So I was having this issue and found that the problem was that I had already registered ownership of a token for whitelisting purposes on my keypair account. When running the spl-token accounts command this was showing and doing some reading alluded to the fact that the mint-token command needed this to be null.
I had to close ownership of the whitelist token spl-token close so that when running spl-token accounts it returned none. I then credited the keypair wallet with some SOL and everything started working as planned.

y0unghe commented 2 years ago

It definitely be lacking of balance. I set the mint price to 1 sol, but in my wallet, I only have 0.9 sol. After I airdrop 2 sol to my wallet, it worked.

mrwolny commented 2 years ago

Same for me, the price property in Candy Machine config was bigger than what I had in wallet. After changing it, it worked like a charm!