metaplex-foundation / sugar

Candy Machine Rust CLI.
Apache License 2.0
198 stars 112 forks source link

[Bug]: after making a send nft transaction, it issues an error code: 0x17a3 #461

Closed cantiir2 closed 10 months ago

cantiir2 commented 1 year ago

Issue description

i did transfer transaction through devnet network and it gives error 0x17a3, how to solve it? whereas last night I was able to make transactions after waking up in the morning I tried again but I couldn't anymore

image

image

Relevant log output

MetaplexError: CandyGuardProgram > Unknown Program Error
>> Source: Program > CandyGuardProgram [Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g]
>> Problem: The program [CandyGuardProgram] at address [Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g] raised an error that is not recognized by the programs registered by the SDK.
>> Solution: Unfortunately, you will need to check the unparsed error below to investigate what went wrong. To get more helpful error messages, ensure the program that failed is registered by the SDK and provides an "errorResolver" method.

Caused By: Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 4: custom program error: 0x17a3

[ Logs: Program 11111111111111111111111111111111 invoke [1] |$> Program 11111111111111111111111111111111 success |$> Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1] |$> Program log: Instruction: InitializeMint |$> Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 2967 of 1000000 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 991670 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 985180 compute units |$> Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success |$> Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2] |$> Program log: Instruction: InitializeAccount3 |$> Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4241 of 981300 compute units |$> Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success |$> Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 20257 of 997033 compute units |$> Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL success |$> Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1] |$> Program log: Instruction: MintTo |$> Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4536 of 976776 compute units |$> Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success |$> Program Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g invoke [1] |$> Program log: Instruction: Mint |$> Program log: (Deprecated as of 1.0.0) Use MintV2 instead |$> Program log: AnchorError thrown in program/src/instructions/mint.rs:22. Error Code: InvalidAccountVersion. Error Number: 6051. Error Message: Invalid account version. |$> Program Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g consumed 21634 of 972240 compute units |$> Program Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g failed: custom program error: 0x17a3 ]

Priority this issue should have

High (immediate attention needed)

samuelvanderwaal commented 1 year ago

This isn't a Sugar issue. You're getting CandyGuardError::InvalidAccountVersion which means you're calling the Candy Guard mint transaction with the wrong account version. I don't know if this is your UI or someone else's but you should be using the mint_v2 instruction instead.

samuelvanderwaal commented 10 months ago

Closing for inactivity.