metaplex-foundation / metaplex

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

Error: "Claim failed. Error: Transaction failed: Owner does not match" #1379

Closed CyberApeAgeNFT closed 2 years ago

CyberApeAgeNFT commented 2 years ago

Describe the bug I created a token transfer with a distribution list of around 2500. The gumdrop was created successfully. The urls were manually sent out to the community to claim. A handful of people had no trouble claiming, and it worked correctly. However a large amount got Error: "Claim failed. Error: Transaction failed: Owner does not match". After extensive checking the wallet was the same for the gumdrop, handle, connected wallet. This was using an unmodified version of the default metaplex project. The host was left as the default as well with the host site ending in gumdrop, which says it is archived. We attempted to change the host to the metaplex ending in the urls, however this made no difference.

To Reproduce Steps to reproduce the behavior: Unknown

Expected behavior We expected everyone to be able to claim their airdrop if they did everything correctly. Which it was confirmed they were.

Screenshots None `#2 Unknown program instruction

Invoking System Program Program returned success Invoking Token Program Program log: Instruction: Transfer Program log: Error: owner does not match Program Token Program consumed 2754 of 173435 compute units Program returned error: custom program error: 0x4 Program gdrpGjVffourzkdDRrQmySw4aTHr8a3xmQzzxSwFD1a consumed 29319 of 200000 compute units`

Desktop (please complete the following information):

Smartphone (please complete the following information): None

Additional context None

lwus commented 2 years ago

This error is coming from Token Program probably when validating the owner. Has the delegate for that token account been changed between creating the gumdrop and now? It is surprising that some people would be able to claim while others cannot.

Please also provide the transaction ID for further investigation if necessary.

CyberApeAgeNFT commented 2 years ago

This error is coming from Token Program probably when validating the owner. Has the delegate for that token account been changed between creating the gumdrop and now? It is surprising that some people would be able to claim while others cannot.

Please also provide the transaction ID for further investigation if necessary.

Token Address: E3RN9omoTNdqKXGj988X8JuCXwNZ6ZHXbfpaZ1nVZbrA

If you look at the transactions. Any transaction that succeeded and is in a multiple of 100 is from the gumdrop.

Good: 2hWHfFdkonnqUxRPmdBYCfZMDtqLDCyBjdAW1up9uad4bEKTPtkr8UeWpLqF28gpHt3o3fcBFfyYgMUhGZCHFnPi

Bad: EYw9XV3QFNDVLG9EPHfKFC2FQrCKjZNjZcSjNjzaQ6ddt74rEWKsNXrGcUaHcP1mhoBdA2F7fyeP8T9Ka6ssEg8

I am at a loss what to do. I need to get these tokens out but I can't figure out the issue, Thank you for looking into it.

lwus commented 2 years ago

It looks like a new gumdrop was created in https://explorer.solana.com/tx/59ErFRUjxht9EpSKBjie5gyQ1ruJxu1p2f11iQrNQmSwhtMQQJsvQE6ykXGheg3c1aiiQXB17bJPGa7Y58nBahD2 which overrode the delegate on your token account for the original gumdrop. You should create a new token account per drop with the corresponding amount of tokens if you want to do multiple gumdrops.

On my side I'll add a check before creation that aborts in case a delegate already exists. Also, it was a nicer UX during development to just use a token-approve but I think its worthwhile going forward to just create a temporary token account with the right funds so this delegate smashing doesn't occur. The candy-machine and print-edition integrations already work this way anyway. Thanks for bringing this up!

CyberApeAgeNFT commented 2 years ago

It looks like a new gumdrop was created in https://explorer.solana.com/tx/59ErFRUjxht9EpSKBjie5gyQ1ruJxu1p2f11iQrNQmSwhtMQQJsvQE6ykXGheg3c1aiiQXB17bJPGa7Y58nBahD2 which overrode the delegate on your token account for the original gumdrop. You should create a new token account per drop with the corresponding amount of tokens if you want to do multiple gumdrops.

On my side I'll add a check before creation that aborts in case a delegate already exists. Also, it was a nicer UX during development to just use a token-approve but I think its worthwhile going forward to just create a temporary token account with the right funds so this delegate smashing doesn't occur. The candy-machine and print-edition integrations already work this way anyway. Thanks for bringing this up!

Hello, thank you for the response.

So the current Token is "E3RN9omoTNdqKXGj988X8JuCXwNZ6ZHXbfpaZ1nVZbrA" That obviously doesn't change.

So I need to create a new wallet, then send my token to that wallet. Then in cli I use the new wallet as my key-pair?

And I have to do this for every gumdrop?

lwus commented 2 years ago

You technically just need a new token account but yes a new wallet + ATA will work. We can probably just leverage the base keypair that is already generated per gumdrop and just make an ATA of that to hold the tokens. If you feel comfortable making typescript CLI changes feel free to give that a shot and I'll merge it in! Otherwise I'll try to get around to it later this week.

lwus commented 2 years ago

That message indicates there were not enough tokens in the wallet's ATA to satisfy all the whitelisted amounts. Though it seems like a gumdrop was created with that wallet https://explorer.solana.com/tx/4zDdLq8G6yRN9G8HAJ89k5LGXew2y8cEoWZvG5DSbdbkWe8KfZAffu5BhZYZ4TRAtwvtQWXtZ15CE4FxCULaBPAd. Are you still having issues?

CyberApeAgeNFT commented 2 years ago

That message indicates there were not enough tokens in the wallet's ATA to satisfy all the whitelisted amounts. Though it seems like a gumdrop was created with that wallet https://explorer.solana.com/tx/4zDdLq8G6yRN9G8HAJ89k5LGXew2y8cEoWZvG5DSbdbkWe8KfZAffu5BhZYZ4TRAtwvtQWXtZ15CE4FxCULaBPAd. Are you still having issues?

Yes still having issues. Here is my setup

I keep running into issues doing dual gumdrops of the same token. I have the token itself with address A I create a new wallet B and create a token account C with 500 tokens I create a new wallet D and create a token account E with 500 tokens

Now all I have to do, is create a gumdrop with the transfermint of address A. With -k my wallet B keypair

Then create another, still with the transfer mint of A but a -k of wallet D.

As soon as I create the second it seems to invalidate the first. Causing errors like account not found, even though the gumdrop was just working and the only change was I created a separate one with a different wallet and different token account.

lwus commented 2 years ago

Account not found sounds like a different error. I ran a quick test just now with 2 wallets and 2 gumdrops and was able to claim successfully. 1st gumdrop: https://explorer.solana.com/address/DwzWqteViK9WHgNV1PP6FVSqmH3pr1ZjHQhfzbitwaCE?cluster=devnet 2nd gumdrop: https://explorer.solana.com/address/ekYHtx11mSkf934M8M97HcU4wwyo8jBH8iFgZpTQxNc?cluster=devnet

dinobby commented 2 years ago

I've faced almost the same issue. For the first few days when I created gumdrop it worked just fine, but few days later many people in the community started to get Error: owner does not match Here's my token address YLTrJGCqZpwZZbCN2D3KTg4PuGBofto8ciqYdPoQEgd any workaround or suggestion? thanks!

Mr4x3 commented 2 years ago

got this error too, some getting claimed some failing

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.