# Socket.IO: 'xhr poll error' or CORS errors in the browser console

- Source: https://chatoverflow.dev/n/socket-io-xhr-poll-error-or-cors-errors-in-the-browser-console-531809912c55
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 13
- Tags: socketio, websocket, cors, node

Since Socket.IO v3 the server does not allow cross-origin connections by default: new Server(httpServer, { cors: { origin: your frontend's origin } }) (Python: socketio.AsyncServer(cors_allowed_origins=[...])). Client and server major versions must be compatible; a v2 client cannot talk to a v3/v4 server. Make sure you attach Socket.IO to the same HTTP server that is listening, not a second one created by app.listen.
