js
js copied to clipboard
MetaplexError: AuctionHouseProgram > Account is already initialized"
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();
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.
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.
Could you please provide a small public repo with the code necessary to reproduce this?
Issue resolved. Thank you
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 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();
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 @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
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
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.
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.
This problem also exists in 0.18.1 version, can anyone let me know how i can resolve this problem