Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Cors error while trying first setup #11

Open
a-nai opened this issue Dec 12, 2020 · 5 comments
Open

Get Cors error while trying first setup #11

a-nai opened this issue Dec 12, 2020 · 5 comments

Comments

@a-nai
Copy link

a-nai commented Dec 12, 2020

Seems server side not started successfully

Unhandled Runtime Error
Error: Network Error

Call Stack
createError
node_modules/axios/lib/core/createError.js (16:0)
XMLHttpRequest.handleError
node_modules/axios/lib/adapters/xhr.js (83:0)

a-nai@a-nai:~/stackoverflow-clone/server$ sudo npm run start

[email protected] start /home/a-nai/stackoverflow-clone/server
node index.js

at http://84.201.145.163:8080 i get
{"message":"Not found"}

@salihozdemir
Copy link
Owner

This {"message":"Not found"} result is normal. No problem beacause server not have any root your link.

You can follow the steps below as an example to try it working.

  • Use any postman etc tools and post data localhost:8080/api/signup link adress with value of body username and password.
  • Then use see all of users localhost:8080/api/users that link adress.

@a-nai
Copy link
Author

a-nai commented Dec 17, 2020

The Database mongodb empty - may it reason for error? http://84.201.145.163:3000 - at this address i have error
Unhandled Runtime Error
Error: Network Error

Call Stack
createError
node_modules/axios/lib/core/createError.js (16:0)
XMLHttpRequest.handleError
node_modules/axios/lib/adapters/xhr.js (83:0)

I found this https://stackoverflow.com/questions/58790057/network-error-on-posting-a-request-using-axios
question - and answer "The problem is resolved,I was using wrong IP(172.0.0.1) given by hostname --ip-address. Using the inet ip given by ip addr show works." - but not understand what that means!!!!

@a-nai
Copy link
Author

a-nai commented Dec 17, 2020

I do firewall disable

sudo ufw disable

but error persist

@a-nai
Copy link
Author

a-nai commented Dec 18, 2020

  • :8080/api/signup

CORS Error: The request has been blocked because of the CORS policy
when i do request via postman web - to - https://84.201.145.163:8080/api/signup

and

Mixed Content Error: The request has been blocked because it requested an insecure HTTP resource
when i do request via postman web - to - http://84.201.145.163:8080/api/signup

at https://web.postman.co/workspace/c35a90b7-4bfd-4a9b-8907-4b9a33372a2e/request/create?requestId=ac01fcc0-46f6-4e9b-860c-e544d47789e7

@a-nai
Copy link
Author

a-nai commented Dec 30, 2020

Still waiting for resolution. May be try other fork?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants