I ran into the same problem.
{
token_address: '0x6632a9d63e142f17a668064d41a21193b49b41a0',
token_id: '7879',
amount: '1',
contract_type: 'ERC721',
name: 'Prime Ape Planet',
symbol: 'PAP',
token_uri: 'https://primeapeplanet.com/metadata/7879',
metadata: '{"name":"Prime Ape #7879","description":"A unique collection of 7,979 3D hand-drawn Prime Apes, stored on the Ethereum network.","image":"https://primeapeplanet.com/images/prereveal.png","externalUrl":"https://primeapeplanet.com"}',
synced_at: '2021-12-28T17:38:03.162Z'
},
... 400 more items
]
}
7998
500
here
TypeError: Cannot read property 'attributes' of null
at /home/amer/ethereum/dapp_marketplace/generator/main.js:42:59
at Array.map (<anonymous>)
at generateRarity (/home/amer/ethereum/dapp_marketplace/generator/main.js:42:26)
when i check the token_uri I can see the attributes are in the metadata
{
"description": "A unique collection of 7,979 3D hand-drawn Prime Apes, stored on the Ethereum network.",
"external_url": "https://primeapeplanet.com",
"image": "https://primeapeplanet.com/images/7879.png",
"name": "#7879",
"attributes": [
{
"trait_type": "Clothing",
"value": "T-Shirt camouflage"
},
{
"trait_type": "Emotion",
"value": "Seducing"
},
{
"trait_type": "Eyes",
"value": "Brown"
},
{
"trait_type": "Skin",
"value": "Light Brown"
},
{
"trait_type": "Hat",
"value": "Beanie Black"
}
]
}
is this an issue with the moralis data or do I need to code around this?