Rarity Ranking Generator doubt

hi, when i do node main.js i get this in my collection, but not in others.
{ total: 0, page: 0, page_size: 500, result: [] }

not sure what you mean, you should upload images to IPFS and also metadata, and the metadata should contain info about rarities, and you should also mint nfts with that metadata

My collection have the metadata, it’s in a gateway. Does it affect in anything?

also i minted the nfts with the correct token uri because in opensea i can see them with the properties

so you see the files on opensea, how you minted them? on chain?

i minted them on polygon testnet, and i’m using moralis testnet server

ok, and you say that they don’t get returned by Moralis API?

yes, right, i get { total: 0, page: 0, page_size: 500, result: [] }

what is the contract address?

0x7192E7CD2B1FdC9AF318276b1b38e31253d06b2A

this seems to work fine:

x = await Moralis.Web3API.token.getTokenIdMetadata({address:"0x7192E7CD2B1FdC9AF318276b1b38e31253d06b2A", token_id: "12", chain: "polygon testnet"})

=>

{token_address: '0x7192e7cd2b1fdc9af318276b1b38e31253d06b2a', token_id: '12', block_number_minted: '24192074', owner_of: '0x4adb16ce845beeea4a05f764f708eec13f4bd61b', block_number: '24192074', …}

It worked, now i can use the getAllTokensId function and all the nfts appear, but now i got:
let metadata = allNFTs.map((e) => JSON.parse(e.metadata).attributes);
^

TypeError: Cannot read properties of null (reading ‘attributes’)
at C:\Users\sebas\Desktop\rarity wea\main.js:29:61
at Array.map ()
at generateRarity (C:\Users\sebas\Desktop\rarity wea\main.js:29:28)

also my metadata says: null but i got right my ipfs (pinata gateway) otherwise it will not show in opensea

it looks like metadata is not synced yet, you can try to force that sync with https://docs.moralis.io/moralis-server/web3-sdk/token#resyncmetadata, but it may not work right now that resync function

Nope, it doesn’t work, there is something that i can do?

you tried to resync metadata now and it didn’t work?

should i put the resync function where is the getAllTokensId right?

i did this and didn’t worked

I tried a resync now, we will see if it works

how long it takes to resync?