I am following the How To Get User NFTs? All NFTs Owned by Address
( https://www.youtube.com/watch?v=S4rZ8EMTFaY )
After logging in as a user, I run the following line of code.
await Moralis.Web3.getNFTs({chain:"eth", address: '0xf56345338cb4cddaf915ebef3bfde63e70fe3053'});
After waiting about 60 seconds, it throws the following two error messages, which repeats about 5 times at intervals of 60 seconds.
Access to XMLHttpRequest at 'https://bemgqvt0f3ju.usemoralis.com:2053/server/functions/getNFTs' from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
moralis.js:21917
POST https://bemgqvt0f3ju.usemoralis.com:2053/server/functions/getNFTs net::ERR_FAILED
On the fifth round, it throws the same error messages, plus an extra one:
moralis.js:24019
Uncaught Error: XMLHttpRequest failed: "Unable to connect to the Parse API"
at handleError (moralis.js:22057)
at async <anonymous>:1:1
I have tried it with several different addresses, and sometimes (for addresses with a small number of NFTs) it is succesful in returning the NFT details. When it is succesful, it returns the details within about 3 seconds. But most of the time, it throws the error messages above. For this address, (the boredelon
account that has thousands of NFTs) I have never seen it return succesfully.
Environment details
Server: https://bemgqvt0f3ju.usemoralis.com:2053/server
Server Version: 0.0.241
Environment: Mainnet
Javascript code was run on my laptop, running a http server locally, on Chrome.