SocketCluster / socketcluster-client

JavaScript client for SocketCluster
MIT License
290 stars 92 forks source link

Failed to connect to the server in React Native Android #131

Open otaradze opened 4 years ago

otaradze commented 4 years ago

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, }

dubynam commented 4 years ago

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"