socketcluster-client icon indicating copy to clipboard operation
socketcluster-client copied to clipboard

Failed to connect to the server in React Native Android

Open otaradze opened this issue 5 years ago • 1 comments

I am trying to connect to Socket Cluster server in React Native(Android).

The connection fails with the log:

[SocketProtocolError: Socket hung up]

Here is the connect option:

{ hostname: SOCKET_HOST, port: 443, secure: true, rejectUnauthorized: false, }

otaradze avatar Aug 15 '19 15:08 otaradze

The same problem, we try to play with options but it didn't help. Some devices can't connect to channel at all. (return 1005 code) especially Samsung Galaxy S6 (android 7.0) But what is interesting we can connect simple socket server like a https://www.websocket.org/echo.html

Environment: "react": "16.8.3", "react-native": "0.59.9", "socketcluster-client": "^14.3.1"

dubinam avatar Oct 11 '19 14:10 dubinam