js icon indicating copy to clipboard operation
js copied to clipboard

MetaplexError: AuctionHouseProgram > Account is already initialized"

Open samia-invozone opened this issue 2 years ago • 8 comments

I'm trying to list NFT by the following code & getting an error(Account is already initialized). const { listing, sellerTradeState, receipt } = await metaplex .auctions() .for(auctionHouse) .list({ mintAccount: new PublicKey(mintAddress), price: sol(price), printReceipt: true, }) .run();

samia-invozone avatar Sep 14 '22 11:09 samia-invozone

Hey there 👋

Did you run this snippet of code more than once by any chance? This error usually means that a listing already exists with these settings. Errors will be clearer in the future sorry about that.

lorisleiva avatar Sep 14 '22 11:09 lorisleiva

Nope, It's giving this error from the very 1st time. I have also tried to list nft by new mint address but still getting the same error.

samia-invozone avatar Sep 14 '22 11:09 samia-invozone

Could you please provide a small public repo with the code necessary to reproduce this?

lorisleiva avatar Sep 14 '22 12:09 lorisleiva

Issue resolved. Thank you

samia-invozone avatar Sep 14 '22 13:09 samia-invozone

Hello @samia-invozone, I faced the issue as well and did not resolve it. Could you elaborate on the fix you made? Or why this was caused?

agtzdimi avatar Sep 14 '22 14:09 agtzdimi

@agtzdimi May I ask you to run this command with skipPreflight: true property and share the logs? It will help to make the issue logs more detailed.

Like in example:

const { listing, sellerTradeState, receipt } = await metaplex
  .auctions()
  .for(auctionHouse)
  .list({ 
    mintAccount: new PublicKey(mintAddress), 
    price: sol(price), 
    printReceipt: true,

    // Add this. 
    confirmOptions: {
     skipPreflight: true
    }
}) .run();

zaxozhu avatar Sep 14 '22 14:09 zaxozhu

Hello @samia-invozone, I faced the issue as well and did not resolve it. Could you elaborate on the fix you made? Or why this was caused?

When you create auction house, you also get your Auction House Fee Account. This fee account must be funded. Try to airdrop SOL into this. Hope so it will work out

samia-invozone avatar Sep 15 '22 05:09 samia-invozone

Thank you @samia-invozone I will try it out today, although I remember I did an initial airdrop, cause I pasted the code from the unit test. In any case, I will post the outcome here @zaxozhu. Much appreciated guys

agtzdimi avatar Sep 15 '22 07:09 agtzdimi

And which version of metaplex do you use? I just use metaplex too, but it's called a little differently for me. More specifically, metaplex.auctionHouse().create(). As an example, creating an auction. But what to do next, I don't even have a clue in what order you need to create all this. Tell me please

leonidstrelok avatar Nov 12 '22 15:11 leonidstrelok

Hi @samia-invozone,

Thank you for your question!

We'd like to make sure our GitHub issue tracker remains the best place to manage issues that affect the development of the Metaplex JS SDK itself.

Your question deserves a purpose-built Q&A forum like StackOverflow so it is more searchable and encourages others to contribute to and benefit from the answer.

Unless there exists evidence that this is a bug with the JS SDK itself, would you please post your question to the Solana Stack Exchange using the following link:

https://solana.stackexchange.com/questions/ask?tags=metaplex

If you could please share the link to the newly created question here afterwards, that would be very helpful for anyone following this thread.


This automated message is a result of having added the "question" label.

github-actions[bot] avatar Nov 23 '22 16:11 github-actions[bot]

const { listing, sellerTradeState, receipt } = await metaplex .auctions() .for(auctionHouse) .list({ mintAccount: new PublicKey(mintAddress), price: sol(price), printReceipt: true, }) .run();

Hello @samia-invozone, I faced the issue as well and did not resolve it. Could you elaborate on the fix you made? Or why this was caused?

When you create auction house, you also get your Auction House Fee Account. This fee account must be funded. Try to airdrop SOL into this. Hope so it will work out

Thank you so much. You really save my day.

thangtranth avatar Dec 04 '22 10:12 thangtranth

This problem also exists in 0.18.1 version, can anyone let me know how i can resolve this problem

sahityaeeshufynd avatar Feb 26 '23 14:02 sahityaeeshufynd