Unable to connect to the Parse API in Gas Stats Demo App

Whenever I try to authenticate with Moralis using await Moralis.Web3.authenticate(), I receive the following error

Error: XMLHttpRequest failed: "Unable to connect to the Parse API"
    at handleError (moralis.js:22057)

I was doing the “Build a dapp in 3 Mins” and got this error, so I tried downloading the code from Github demo apps (both moralis-gas-demo and moralis-angular-app) and still get the same error. In fact, even when I open the dev console at the sample gas demo link, I get the same Parse API error https://moralis-gas-demo.netlify.app/

This is where the error is happening https://github.com/MoralisWeb3/demo-apps/blob/main/moralis-gas-demo/index.js#L24 (and I have updated the code with my app ID and server URL).

1 Like

Let me run this code and get back to you.

Thank you for your patience.

I ran the moralis-gas-demo code from my end and it seems to be working. The issue might be in the config setup. Could you let me know what network you’re using for your server? Local? Ethereum ? BSC?

Infact, when I checked the netlfiy demo link, the functionality works as well. Perhaps some screenshots would help us understand the issue better.

Looking forward to hearing from you.

Thank you for your quick response!

I’ve tried using both my Mainnet server instance with Eth/Polygon/BSC as well as my Testnet with the same chains.

Here is a screenshot of my local code. I also have a screenshot of the netlify demo link with the same error if you want me to add that to another post (it says I’m not allowed to have two images in post)

I realized I have proxy settings/firewall on the machine I am using which seems to be causing the issue. I tried out the the netlify link and demo app on localhost on another machine, and both work perfectly! Thanks for looking into this, sorry for the trouble.

1 Like

Ah, that must be it then. Thanks for letting us know. I’ve tried again with multiple machines just to make sure and responses seems to go through.

Cheers. Happy BUIDLing! :smile: