[SOLVED] getTokenIdMetadata function not working in production environment

I have a dapp that makes use of the getTokenIdMetadata function. When running in a development environment it works completely fine, however after deploying the dapp to fleek.co I am getting some strange errors.

const _metaData = await Moralis.Web3API.token.getTokenIdMetadata(options);

These are the errors in the console:

that error says that no metadata was found. that would mean that the results depend on the parameters that it receives.

The parameters are equal when run in both a development and production environment. It is the exact same app just hosted differently.

Ok, can you look in network tab in browser an paste what you see there when the request fails?

This is in the production environment:

You can click there in that request that failed and see what happened

It just says there was no metadata, which makes no sense because it works with the same nft ID in a development environment.


You can also see the request that was sent in network tab, can you paste that one?

For some reason the request seems to be for token id 9, but 9 has not been minted yet so I am unsure what is the issue

It appears that this issue was something to do with fleek.co

For some reason it was accessing the wrong moralis server. I deleted the server it seemed to be accessing, but the app continued to work. I did a complete redeploy and purged the cache on fleek and it now seems to work correctly. I have no idea what has caused this.

1 Like