1
votes

I get the following error in my chrome console.

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

In my firefox i get this

The connection to ws://c7f2053b.ngrok.io/socket.io/?EIO=3&transport=websocket&sid=h1U3iQ9b3INSkg9xAAAC was interrupted while the page was loading.

Is there anyway to clear this issue please suggest me ...

1

1 Answers

0
votes

Please check
1) Chrome and Firefox versions. Older versions might not have full support for WebSockets What browsers support HTML5 WebSocket API?
2) Test Basic code :: Try with regular JavaScript Code first and see if connection is establishing:-

websocket = new WebSocket(URL);
websocket.onopen = function(evt) {
    alert("Connected...");
    websocket.send(message);
websocket.onmessage = function(evt) {
    alert(evt.data);
};
websocket.onclose = function(evt) {
    alert(evt.data);
};
websocket.onerror = function(evt) {
  alert(evt.data);
};