Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

getOrCreateAssociatedTokenAccount function returning error TokenAccountNotFoundError #6603

Closed
@ShivangRawat30

Description

@ShivangRawat30

I am trying to make an associated token account for my project.

  const mintAddress = new PublicKey(
      "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
    );
    console.log(connection, wallet, mintAddress, wallet.publicKey);
    const toAta = await getOrCreateAssociatedTokenAccount(
      connection,
      wallet,
      mintAddress,
      wallet.publicKey,
    );

this code is returning a TokenAccountNotFoundError I am using USD Coin Dev token for this project and the error looks like this.

Screenshot 2024-04-21 at 1 26 13 PM Screenshot 2024-04-22 at 2 42 09 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions