js
js copied to clipboard
Error while creating NFT
I am trying to create NFT using metaplex-foundation/js module. I installed the lastest versions. But I cannot create even sample example NFT.
Here is the code. let { nft } = await metaplex .nfts() .create({ uri: "/fallbackImage.jpg", name: "New NFT", sellerFeeBasisPoints: 500 });
First, I tried on testnet
But I got this error.
{ "jsonrpc": "2.0", "error": { "code": -32002, "message": "Transaction simulation failed: Error processing Instruction 4: Failed to serialize or deserialize account data: Unknown", "data": { "accounts": null, "err": { "InstructionError": [ 4, { "BorshIoError": "Unknown" } ] }, "logs": [ "Program 11111111111111111111111111111111 invoke [1]", "Program 11111111111111111111111111111111 success", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]", "Program log: Instruction: InitializeMint", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 2967 of 1200000 compute units", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", "Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL invoke [1]", "Program log: Create", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]", "Program log: Instruction: GetAccountDataSize", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1622 of 1191670 compute units", "Program return: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA pQAAAAAAAAA=", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", "Program 11111111111111111111111111111111 invoke [2]", "Program 11111111111111111111111111111111 success", "Program log: Initialize the associated token account", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]", "Program log: Instruction: InitializeImmutableOwner", "Program log: Please upgrade to SPL Token 2022 for immutable owner support", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1405 of 1185180 compute units", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]", "Program log: Instruction: InitializeAccount3", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4241 of 1181300 compute units", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", "Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 20257 of 1197033 compute units", "Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL success", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]", "Program log: Instruction: MintTo", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4536 of 1176776 compute units", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", "Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s invoke [1]", "Program log: Error: BorshIoError", "Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s consumed 2753 of 1172240 compute units", "Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s failed: Failed to serialize or deserialize account data: Unknown" ], "returnData": null, "unitsConsumed": 27760 } }, "id": "ea22898b-06d8-4dc5-beab-29f0eb5855b3" }
Please help me asap. Thank you.
Hi there 👋
Do you get the same error on devnet
or mainnet-beta
? I've got a feeling testnet
doesn't have all the latest programs.
Hi there 👋
Do you get the same error on
devnet
ormainnet-beta
? I've got a feelingtestnet
doesn't have all the latest programs.
Hi, It works on mainnet and devnet. Thank you
Thanks for confirming! I don't think Metaplex's programs are fully deployed on testnet so best to use devnet instead.