project_chat_application icon indicating copy to clipboard operation
project_chat_application copied to clipboard

not working

Open parnaz-pirhadi opened this issue 1 year ago • 2 comments

i have a lot of error : Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://project-chat-application.herokuapp.com/socket.io/?EIO=3&transport=polling&t=OiTBTSl. (Reason: CORS request did not succeed). Status code: (null)

and when i want to chat , nothing happend

parnaz-pirhadi avatar Oct 11 '23 05:10 parnaz-pirhadi

Hi @parnaz-pirhadi I also faced same issue.

Actually in this code there are two phase that is : client & server.

You have to npm start both the folder and change the Endpoint (as shown in image, in Chatjs component) image

The issue is because the "https://project-chat-application.herokuapp.com/" host might be inactive, that's why it is not accepting response.

for me changing the Endpoint worked, and I came across new bugs!!

Happy coding

venkateshatgit avatar Nov 25 '23 07:11 venkateshatgit

socket.io has changed its documentation. You can refer to this page https://socket.io/docs/v3/handling-cors/

Or check my repo https://github.com/Lagnajit09/realtime-chat-app.... I have used the latest version and it works perfecttly

Lagnajit09 avatar Feb 25 '24 19:02 Lagnajit09