Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not serving/connecting on Android 9 #79

Open
dwdvIl opened this issue Nov 20, 2021 · 0 comments
Open

Not serving/connecting on Android 9 #79

dwdvIl opened this issue Nov 20, 2021 · 0 comments

Comments

@dwdvIl
Copy link

dwdvIl commented Nov 20, 2021

The server starts (onStart called) but it's not visible to any WebSocket clients, not even in the same phone. Error callback is not called.
Creating the server works on a different Android version, but connecting the Android 9 device to it doesn't work either.
It's not a WebSocket client problem, since connecting to a test server works.

Test Codes:

  • Server:
wsserver.start(5457, {
      'onFailure': console.log,
      'onOpen': onClientConnected,
      'onMessage': onClientMessage,
      'onClose': onClientDisconnected,
      'tcpNoDelay': true
   }, function onStart(addr, port) {
     console.log('Server started.', addr, port);
   }, function onDidNotStart(reason) {
     console.log('Server not started. Reason: ' + reason);
 });
  • Client (connecting to local server):
client = new WebSocket('ws://192.168.x.xxx:5457');
  //readyState: CLOSED, code: 1006
  • Client (connecting to test server):
client = new WebSocket('wss://demo.piesocket.com/v3/channel_1?api_key=oCdCMcMPQpbvNjUIzqtvF1d2X2okWpDQj4AwARJuAgtjhzKxVEjQU6IdCjwm&notify_self')
//message: {"info":"You are using a test api key"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant