Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid frame header

I am trying to make a real time application. I am using NodeJS as a server and Socket.IO, to achieve my real time functionality.

The problem is I am getting error as:

 WebSocket connection to 'wss://localhost:1234/socket.io/?EIO=3&transport=websocket' failed: Invalid frame header

I tried many things, like changing https to http, lowering the Socket.IO version, etc., but nothing worked for me. Please help me with the cause of the problem, so that I can pinpoint the error in my application. I don't want to go for other COMET protocols.

like image 395
Pranay Dutta Avatar asked Dec 06 '22 14:12

Pranay Dutta


1 Answers

Use the same version of socket.io and socket.io-client on both server and client.

like image 50
Heartbit Avatar answered Dec 28 '22 02:12

Heartbit