Metadata returning null

We have recently moved a site from testnet to mainnet but now on return of the getNFTs function in mainnet the metadata returned is NULL with the status still saying Syncing.

All the other data is there, just metadata and synced_at is NULL. In testnet this worked fine (some delay sometimes but always there) .

The only difference we see after testing the exact code on testnet (again) (Which worked fine) was the console out states that the status is Synced in testnet not Syncing like mainnet

Contract address: 0xF88dC0CC40f14f6D09FEd6B6C4AD719177C2D941
Token owner: 0x687d2220075b787fbce0ae2813f9030d3a7e3f08
Token ID: 1

1 Like
options = { address: "0xF88dC0CC40f14f6D09FEd6B6C4AD719177C2D941", token_id: "1", chain: "eth" };
tokenIdMetadata = await Moralis.Web3API.token.getTokenIdMetadata(options);

returns:

{
    "token_address": "0xf88dc0cc40f14f6d09fed6b6c4ad719177c2d941",
    "token_id": "1",
    "contract_type": "ERC721",
    "token_uri": "https://enc-cbg.mypinata.cloud/ipfs/bafkreialpoes53zbcyjxunnzgbbdicd3xqib2euewfnvqrqzlz2a7ijazm",
    "metadata": null,
    "synced_at": null,
    "amount": "1",
    "name": "ENCODE",
    "symbol": "ENET"
}

it looks like you still have that token_uri from where you can extract the metadata

if that metadata still doesn’t appear in one day, we will have to check

Thanks for the reply, this has been happening since about 9AM yesterday.

We gave it 24 hours to see if it synced in that time but still no luck.

We tested the getNFTMetadata function aswell yesterday but this returned “No metadata”

after calling Moralis.Web3API.token.getTokenIdMetadata I would expect it to try to extract/update the metadata once again in 24 hours, as I called it now, that is why I would wait one more day

it looks like on opensea it got processed ok: https://opensea.io/assets/0xf88dc0cc40f14f6d09fed6b6c4ad719177c2d941/1

I found out meanwhile that it is a backlog for metadata to fetch, and that it is why it takes so long.

Thank you for your reply and update!

Do you have a timeframe on clearing the backlog?

we hope that maybe tomorrow will be better

1 Like

Seems to have synced and all data has now been picked up.

Will see how we go with future NFTs minted on the contract, thanks for all your help.

1 Like

This issue seems to be back again. Here’s an example of a contract with metadata cached for one token and missing for another one. Both tokens are about 3 days old.

curl -X 'GET' \
  'https://deep-index.moralis.io/api/v2/nft/0xE5879689e2E4F32f309b381CE72F8b721157338E?chain=polygon&format=decimal&order=DESC' \
  -H 'accept: application/json' \
  -H 'X-API-Key: ###'

I think that there is a backlog for metadata processing on polygon network

Hi, I am experiencing the same issue with using a server deployed to the TestNet. Using the Moralis.Web3API.token.getAllTokenIds or the Moralis.Web3API.token.getAllTokenIds method, I get all the data except metadata and name. The token does how up on OpenSea correctly.

could this still be due to backlog issue? I also tried to manually resync by calling Moralis.Web3API.token.getAllTokenIds but I got a rate limit error. Is it the expectation that moralis server would re-index the metadata at certain time w/o the resyncing?

example:

amount: "1"
contract_type: "ERC1155"
metadata: null
name: null
symbol: null
synced_at: "2022-03-12T20:03:05.482Z"
token_address: "0x38d50f93de86fcbd4fdfbb755e9b3e14806a79e8"
token_id: "9894279673266968728295769701739440358065714325130713693112648321695189432008"
token_uri: "https://ipfs.moralis.io:2053/ipfs/QmfL6wnSXEiqbFXsTTPvCt9bukcFhrKHAunQndrsnnVZyz"

thank you!

I think that you should try to do a resync, in the case that you pasted, you can try to resync the metadata.

when trying to resync, you may not be able to make more than 2 requests per minute now

i see. thanks for the response!
Right now, since I’m falling back to fetching via token_uri if metadata is null. Works fine enough for my limited use at the moment. Would appreciate some guidance on the best practice with syncing metadata though.
How does metadata syncing works with Moralis in genera? Should we expect to manage the resyncing in our dApp or can I expect that after a certain X of time, metadata would at some point be synced?

it could depend from contract to contract, for example if it is a well known contract then probably more users will try to resync the metadata if it is not up to date

gotcha. that makes sense. thanks!

Moralis now supports refresh for all NFTs automatically Moralis Updates NFT Metadata