thirdweb-example / marketplace-v3

Create an NFT marketplace on top of your NFT collection on **any** EVM-compatible blockchain.
https://marketplace-v3.thirdweb-example.com/
Apache License 2.0
117 stars 139 forks source link

Error after attempting to load assets from the "Buy" page of imported contract. Error serializing '.contractMetadata.description' #4

Closed Jharmony closed 6 months ago

Jharmony commented 1 year ago

After following your details instruction, which includes deploying my marketplacev3 contract and importing my ERC-721A collection on the Thirdweb dashboard, I continue to get an error on the "buy" component of the dapp. The NFTs from my collection do load successfully on the grid, but when I attempt to load anyone NFT to see further details this error shows up: Server Error Error: Error serializing.contractMetadata.descriptionreturned fromgetStaticPropsin "/token/[contractAddress]/[tokenId]". Reason:undefinedcannot be serialized as JSON. Please usenullor omit this value.

I've also submitted a similar issue when attempting to load the marketplace contract and imported collection contract on the help section of the official discord which could be found here:

image

timmaycastags commented 1 year ago

Hey Jharmony. I had the same problem. I was able to fix it by adding a JSON.stringify() while getting the metadata from the contract. I updated the line in the [tokenId].tsx file. line 371 contractMetadata = await JSON.stringify(contract.metadata.get());

Hope that helps.

saminacodes commented 6 months ago

Hey friends! We recently updated this template to the latest version of our SDK which hopefully resolves this issue. If you are still having any issues with the template please let us know!