question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebSocket connection to failed: Invalid frame header

See original GitHub issue

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

server debug:

 socket.io:server incoming connection with id 7hnvZ1RkTsCgjyVVAAB- +4ms
 socket.io:client connecting to namespace / +3ms
 socket.io:namespace adding socket to nsp / +1ms
 socket.io:server incoming connection with id gOcFr2YHNcmSF9hqAAB_ +2ms
 socket.io:client connecting to namespace / +2ms
 socket.io:namespace adding socket to nsp / +1ms
 socket.io:namespace next called after client was closed - ignoring socket +74m

 socket.io:namespace next called after client was closed - ignoring socket +2ms

 socket.io:namespace next called after client was closed - ignoring socket +1ms

 socket.io:namespace next called after client was closed - ignoring socket +2ms

 socket.io:namespace next called after client was closed - ignoring socket +2ms

 socket.io:namespace next called after client was closed - ignoring socket +1ms

On client side: var socket = io({transports: ['websocket']}); //socket.io

What’s wrong?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:26

github_iconTop GitHub Comments

7reactions
mikecanncommented, Aug 11, 2021

For me the answer was that I was connecting with a client that was version 2 and the server was running version 4. As per the docs I had to enable allowEIO3 on the server

2reactions
carloverhammecommented, Oct 21, 2018

Same issue, I only get the error in the chrome console

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to debug 'Invalid frame header' Websocket issues with ...
From my small research, Invalid Frame Header can be generated on Websocket protocol when the server sends an empty response (message with 0...
Read more >
WebSocket connection to failed: Invalid frame header #4039
The server and client socket.io versions were not matching. The client was referencing 2.3.0 and the server was installing 4.1.3 as shown above....
Read more >
Flask-SocketIO error in chrome: Invalid frame header - Reddit
The problem is when I send a post request to main.html , the connection closes, and I can no longer emit anything to...
Read more >
Getting invalid frame header error when Proxy is used - react
Hi,. We are using React to run a Chrome application that communicate to our Meteor server (1.8.3) over WSS. Our Meteor is hosted...
Read more >
WebSocket issues / invalid frame header (occasionally)
WebSocket issues / invalid frame header (occasionally) · 1. Open resources page · 2. Play with enable/disable resources · 3. Have a look...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found