2

I am working on a project that is pretty urgent and this error stays prominent when I try and fetch the Token Account of an MKRS NFT:enter image description here

All other NFTs work fine, so I'm not sure why this one doesn't.

Here is the suspected code fault:

const tokenAcc = await getAssociatedTokenAddress(mint, this.publicKey);

I'm not sure why this is the only NFT that doesn't work.

Link to NFT on Solscan.

6
  • what is the value (pubkey) of this.publickey and mint Commented Dec 11, 2022 at 21:41
  • @WrathionTBP mint is the token mint address and this.publicKey is the user's public key note: the mkrs NFT is frozen/staked but we're not sure what the exact problem is since other nfts that are frozen fetch fine (as shown in the "Mint: ... Token Account: ..." log)
    – incog
    Commented Dec 11, 2022 at 22:04
  • Have you tried making a getAssociatedAddress() call and checking that the token is actually in the correct token account it expects for the user? It's possible it might in a different account and not following the standard if the returned address is different.
    – Tony Boyle
    Commented Dec 12, 2022 at 15:10
  • @TonyBoyle I can't seem to find getAssociatedAddress() on the native solana sdk, only getAssociatedTokenAddress() (which is the source of the error) -- It throws a Token Not found error.
    – incog
    Commented Dec 13, 2022 at 19:52
  • Can you please replace these screenshots of the error message with the text of the error message? This will make your question and the answers attached to it searchable in Google for others having the same trouble as you. Commented Feb 18, 2023 at 4:01

0