'WebSocket connection to '...' failed: Invalid frame header

I use express and socket.io

My node server is running on 127.0.0.1:3000 and i have connected it

var socket = io.connect('http://127.0.0.1:3000', {query: 'id=' + user.id});

There is a warning in my browser console.

WebSocket connection to 'ws://127.0.0.1:3000/socket.io/?id=ecad7e1a009eb4f943ead0b4db8d62c4&EIO=3&transport=websocket&sid=0RMaRoZb7U67td_2AAAD' failed: Invalid frame header

Also it runs well. There is no problem :). But i wondered.



Solution 1:[1]

Maybe you should check versions of socket client and server. They should be the same.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andrey.Kostyuchenko