Unexpected CORS errors

Our site just started getting:
Access to XMLHttpRequest at ‘https://deep-index.moralis.io/api/v2/0xc452bf6d1655dda4ab25e1dac9a03f9622fe43e1/erc20?chain=polygon’ from origin ‘https://genesis.game’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

This isn’t close to acceptable - if Moralis can be used, there should never be a CORS issue. Can you fix ASAP please.

1 Like

How often you get those CORS errors? you get them for any request to deep-index?
I tired that request and works for me separately. Sometimes you can get CORS errors when it is a timeout too.

I tried that site, I saw an error in console, to another endpoint, and that error it looks like it was because of using order=DESC for /{address}​/nft​/{token_address} endpoint.

I only saw them once, lasting for 3-4 minutes before it fixed itself. But even once (especially with some reports from other people) is making me question Moralis as a service provider. The order=DESC is a separate error (fixed now).

You shouldn’t ever get a CORS error on a timeout. The server should reply with a correctly-formatted 504 error. That way, the app can handle errors correctly (if every error is a CORS error, there’s no information to give)

There’s definitely some big slowdownissues in stuff that really shouldn’t ever slow down or time out. Look at this screenshot, all going against the API; there’s 50+ second calls happening:

In some ways, I’m glad the requests complete eventually. In many others, this is a really bad experience because you’d expect returns on these queries in ms.

1 Like

Thanks we have reported to devs they are on it

@barclanderwhat what is your issue now exactly

Let’s keep one thread to one issue so we can easily follow - if you discover several issues please do another thread for them

Is the issue that some requests take long time?

In that case - post exact request thanks! :raised_hands:

It was every Web3API call from our site (on my local machine, in that instance) taking tens of seconds. I’ll give the devs some time to fix the CORS issue; I’m guessing they’re tightly related, and we have mitigations in place for slow function returns so it’s not fatal. If I see more recurring issues, I’ll post it.

Ok thanks - we need exact requests in order to reproduce the issues and fix them

Keep us posted

We are here to help :raised_hands:

Hello.
I am simply following the youtube tutorial:

How to Build Serverless Dapps Part 1 - Web3.js & Moralis Programming Tutorial

When I try to login I get this code. I tried connecting to my local net work and also the ethreum blockchain as well as some other. I keep getting this error.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.parse.com/1/users. (Reason: CORS request did not succeed).

why is this happening?

Hi @eitanbron

Please double-check our common issues at FAQ - Common Issues & How To Get Help as well as how to properly submit if nothing there helped you.

  • Provide any screenshot about your error.
  • Provide the code properly following this guide: FAQ - How to post code in the forum
  • Step by step on how to replicate the issue.
  • Provide your subdomain.