SocketCluster / socketcluster-client

JavaScript client for SocketCluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SC Client with HTTPS Server seems not working only in React Native Android App.

beingshashi opened this issue · comments

Hi,

We have react native based app. Our server is now HTTPS Enabled. We have also configured the socketcluster-server to work with our SSL Certificates.
By using the secure:true option, it seems to work everywhere including WEB AND REACT NATIVE IOS App, except the android one.

We have tried every possible option including providing the certificate files, in the protocolOptions settings, but still, it does not seems to work.
We have also tried the react-native-pinning-ssl thing, but no success.

Any suggestions on how do we make it running on our react native Android app.

Thanks,

If it works on web and React Native, it should work on Android. Is there any difference in your setup for the two platforms? Maybe something is different with bundling or you use different source code/dependencies for each platform?

Yes, that is a correct assumption. As code gonna be same for both Android and iOS, but unfortunately Android is not allowing to have HTTPS communication from in to out. The setup for both is single and same only, but it seems to something Android level issue. Not able to figure it out what.

commented

What do you mean with from in to out ?

I have not used SC in native yet but, it should just use the ws library, same as https://www.npmjs.com/package/react-native-websocket, I don't know how/why it would be an Android problem unless your device/OS is outdated