IPFS Data not read by Opensea or Rarible

Hi, there!

I created an IPFS JSON file using Moralis


But this is not read by Rarible or Opensea

But I created save Json manually on Pinata, It is readable on Rarible or Opensea


Can not figure it out what is going on, on thing I notice file is look like text on Moralis

This is the code that I use for generate Moralis IPFS

const metadata = {
    description: nftDescription,
    external_url: "https://blockstars.com.au/collections/" + props.item.attributes.collection.id,
    image: nftFilePath,
    name :nftFileName,
    attributes : props.item.attributes.properties != undefined ? props.item.attributes.properties : [],

const nftFileMetadataFile = new Moralis.File("metadata.json", {
    base64: btoa(JSON.stringify(metadata)),
await nftFileMetadataFile.saveIPFS();

const nftFileMetadataFileHash = nftFileMetadataFile.hash();
const nftFileMetadataFilePath = nftFileMetadataFile.ipfs();

Weird, the data seems to be the same

can you try submitting https://ipfs.moralis.io:2053/ipfs/QmXc4SCYnpQRf2js9vbRwFx7fUKmcdPWrfyMxtGxL5Yvsj and see if that works.

I took moralis url but pinata hash

So we test if it’s something the way moralis encodes the response or something how the data is originally uploaded…

1 Like

Hi @ivan ,

This is working fine

1 Like

how about https://gateway.pinata.cloud/ipfs/QmSkNX33n9Y62RASbeMmnmu3oULZMoTWJFP2iPq4fkJ3kN ?

1 Like

Can you send me your opensea testnet link? @neil

I just tried the same thing with the exact same metadata as you, using moralis IPFS, and I got it to work.

1 Like

Hi @ivan @filip

Finally, I found the problem; it is not about the JSON file. The Moralise Json file is working; there is no issue with that.

Problems are below,

  1. There is a baseURL on the smart contract which has only “/” so the tokenURI generate as below

It was not there in the first place; we had a function for change baseURL, so (someone changes it into ‘/’ )

  1. If you add the wrong NFT to the Opensea or Rarible, even if you corrected it, The NFT would not change metadata until you manually reload metadata.

It took my whole data to fix the small mistake that we have made, and thank you, @ivan @filip