GetrAllTokenIds not returning list of NFTs

Following Ultimate NFT Programming tutorial and encountering an issue whereby getAllTokenIds is unable to return the list of NFTs on rinkeby.

You can see the contract on rinkeby here.

You can see the collection opensea testnet here

async function initializeApp() {
  let currentUser = Moralis.User.current();
  if (!currentUser) {
    currentUser = Moralis.authenticate();
  }

  const options = { address: "0x3f01635039d6f43ca37fb79f05cd1d267f0be25a", chain: "rinkeby" };
  let NFTs = await Moralis.Web3API.token.getAllTokenIds(options);
  console.log(NFTs);
  fetchNFTMetadata(NFTs.result);
}

initializeApp();

CURL

curl -X 'GET' \
  'https://deep-index.moralis.io/api/v2/nft/0x3f01635039d6f43ca37fb79f05cd1d267f0be25a?chain=rinkeby&format=decimal' \
  -H 'accept: application/json' \
  -H 'X-API-Key: NQPn6xgVzzOGO4R4bcTpzB7gj7fMaed23SCt1tV0rXGiPfUjtYblO0sHyQxV4CeH'

Request URL

https://deep-index.moralis.io/api/v2/nft/0x3f01635039d6f43ca37fb79f05cd1d267f0be25a?chain=rinkeby&format=decimal

Response

{
  "total": 0,
  "page": 0,
  "page_size": 500,
  "result": [],
  "status": "SYNCED"
}

it looks like a problem on Moralis side of not indexing those NFTs

you may find some info in NFTOwners table in your Moralis server

Anything we can do to get Moralis to index?

I doesnโ€™t seem like it is something that you can do on your side now. I already tried to call getTokenIdMetadata for a specific token id

Is this issue solved?
My console returns
โ€œPOST https://nfccl5ero9j0.usemoralis.com:2053/server/functions/getTokenIdMetadata 400โ€

What is the exact request that you make, do you also see an error message?

Error: No metadata found! Try again later
at Function. (moralis.js:7643:23)
at tryCatch (moralis.js:72991:40)
at Generator.invoke [as _invoke] (moralis.js:73222:22)
at Generator.throw (moralis.js:73047:21)
at asyncGeneratorStep (moralis.js:29637:24)
at _throw (moralis.js:29663:9)

const options = { address: โ€œ0xdโ€ฆ07โ€, token_id: โ€œ1โ€, chain: โ€œrinkebyโ€ };
const tokenIdMetadata = await Moralis.Web3API.token.getTokenIdMetadata(options);

Now you have an api function to request metadata update for a specific token id, you could try it to see if it works.

1 Like

Will try the api function later to see the that work, thx