You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running the server on android and trying to connect to it from macbook on same network.
Getting the following error on chrome and firefox:
WebSocket connection to 'ws://192.168.0.102:8888/echo' failed: One or more reserved bits are on: reserved1 = 1, reserved2 = 0, reserved3 = 0
Firefox:
[21:25:49.381] The connection to ws://192.168.0.102:8888/echo was interrupted while the page was loading. @ http://192.168.0.102:8888/:7
<html><head><title>Web Socket test</title><scriptsrc="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script>functioninitws(){varconnection=newWebSocket('ws://192.168.0.102:8888/echo',"chat");// When the connection is open, send some data to the serverconnection.onopen=function(){console.log('connected');// Send the message 'Ping' to the server};// Log errorsconnection.onerror=function(error){console.log('WebSocket Error',error);};// Log messages from the serverconnection.onmessage=function(e){console.log("Message",e);};}</script></head><body><h1>Web Socket test</h1><buttononclick="initws()">Connect</button>
Update:
Same error on chrome on android itself, so it should not be a firewall issue.
Also the error happens just after onopen as I am getting the 'connected' message. And if I send some message back from index.html in onopen, it is received by the server
The text was updated successfully, but these errors were encountered:
I am running the server on android and trying to connect to it from macbook on same network.
Getting the following error on chrome and firefox:
WebSocket connection to 'ws://192.168.0.102:8888/echo' failed: One or more reserved bits are on: reserved1 = 1, reserved2 = 0, reserved3 = 0
Firefox:
[21:25:49.381] The connection to ws://192.168.0.102:8888/echo was interrupted while the page was loading. @ http://192.168.0.102:8888/:7
Server code
index.html
Update:
Same error on chrome on android itself, so it should not be a firewall issue.
Also the error happens just after onopen as I am getting the 'connected' message. And if I send some message back from index.html in onopen, it is received by the server
The text was updated successfully, but these errors were encountered: