EthNFTOwners not populated nor mined

So, I tried minting ERC721 token in local dev chain. But it seems that the token has not been mined and it is also not shown in EthNFTOwners table.
The EthNFTTransfer table does show that it has been confirmed after I did a transaction to mine/confirm the previously minted NFT. But it does not work.

I’ve also written code to fetch the owner of the ERC721 tokenid. But it returns an error of :

"message": "VM Exception while processing transaction: revert ERC721: owner query for nonexistent token

It’s only the ERC721 token that’s having the issue. I am able to mint and populate the data of ERC1155 token successfully.

Is there anything wrong with the Moralis not accepting the ERC721 details for mining?

what is the code that you wrote for that?

There could be some problems if you reused your Moralis Server with multiple instances of Ganache, as in if you used same Moralis Server in the past, minted something in Ganache, then closed Ganache, started a new Ganache and used same Moralis Server that had transactions from previous Ganache instance.

Hi! thanks for your response.
I wrote the following code which generated the error:

let owner = await erc721Contract.methods.ownerOf(tokenId).call()

I have used the same contract and ganache instance and moralis server.

ERC1155 tokens are successfully minted and it was also deployed along with ERC721 contract. So if there was a problem. It should have occurred on both right?
Anyway, let me redo all the processes with new contracts and fresh ganache instances.

If you refresh ganache instance, make sure to delete and create a new Moralis Server too.

Nope. Restarted Ganache, created new moralis server, deployed new contract, but the result is still the same. I do get the tokenId of nft through the minting receipt but it returns an error when I try to access the nft’s data. But ERC1155 is working.
IDK now. The contract for ERC721 is correct I’ve checked it all several times already.

you get error on this let owner = await erc721Contract.methods.ownerOf(tokenId).call() ?
This call doesn’t depend on Moralis Server, it should go directly to your ganache instance