SocketCluster / socketcluster-client

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

react-native ws-browser unable to resolve error #80

Closed SaurabhKshirsagar closed 6 years ago

SaurabhKshirsagar commented 7 years ago

capture

jondubois commented 7 years ago

@SaurabhKshirsagar Are you using he latest versions of react-native and socketcluster-client.? There were a few issues with RN but those were resolved in socketcluster-client a while ago but this might depend on the RN version as well. See https://github.com/SocketCluster/socketcluster-client/issues/67#issuecomment-303824093

SaurabhKshirsagar commented 7 years ago

@jondubois i am using react-native 0.41.2 and socketcluster-client 5.3.1

AustinHunt commented 7 years ago

@SaurabhKshirsagar, I just set this up in RN@42.3 and it works perfectly.

jondubois commented 7 years ago

@SaurabhKshirsagar Maybe check that you are passing the right options to the socketCluster.connect function on the front end - There was an issue with the GitHub README documentation which showed a protocol option - There is actually no protocol option (make sure you remove it); to use a secure HTTPS/WSS connection, you need to set an option secure: true. @NomadGraphix fixed the documentation issue here: https://github.com/SocketCluster/socketcluster-client/pull/81/files