You could get that error when server is not working, when it gets a timeout or when you have something that blocks that connection like a vpn.
The server is running fine and I can even make calls via the js console
Can you look in browser network tab to see what it says there?
That is browser console. Browser network is somewhere near console, it is something different.
yes, this is the network tab
for me it worked if I paste directly in browser https://owexnxuzf2ev.usemoralis.com:2053/server/functions/createAvatar
Ok any idea what may be causing the cors policy error?
try to see if it works in the browser directly
Yeah it works in the browser
ok, then try with http://127.0.0.1:3000’
instead of http://localhost:3000’
2022-04-29T19:24:24.096Z - ReferenceError: user is not defined
Moralis info logs
Error: {“message”:“user is not defined”,“code”:141}
that is expected one is OPTIONS for Request Method
click on the one where it says bad request
{“code”:142,“error”:“Validation failed. Please login to continue.”}
Getting validation failed probably because of the “requireUser: true”
So the cors issues seems to have stop, not im getting set errors and user not defined
This fixed the CORS issue, thank you!