TubeSock
TubeSock copied to clipboard
Cannot connect to websocket on Android 4
I have created an Android application that uses this package and whenever I try to call connect on the websocket I get the following error :
03-20 11:21:50.005 4255-4270/? W/System.err﹕ com.firebase.tubesock.WebSocketException: error while creating secure socket to wss://fitnessmd.now.sh:443/websocket 03-20 11:21:50.010 4255-4270/? W/System.err﹕ at com.firebase.tubesock.WebSocket.createSocket(WebSocket.java:275) 03-20 11:21:50.010 4255-4270/? W/System.err﹕ at com.firebase.tubesock.WebSocket.runReader(WebSocket.java:306) 03-20 11:21:50.010 4255-4270/? W/System.err﹕ at com.firebase.tubesock.WebSocket.access$000(WebSocket.java:30) 03-20 11:21:50.010 4255-4270/? W/System.err﹕ at com.firebase.tubesock.WebSocket$2.run(WebSocket.java:108) 03-20 11:21:50.010 4255-4270/? W/System.err﹕ at java.lang.Thread.run(Thread.java:841) 03-20 11:21:50.010 4255-4270/? W/System.err﹕ Caused by: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate 03-20 11:21:50.015 4255-4270/? W/System.err﹕ at com.android.org.conscrypt.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:146) 03-20 11:21:50.015 4255-4270/? W/System.err﹕ at com.firebase.tubesock.WebSocket.verifyHost(WebSocket.java:285) 03-20 11:21:50.015 4255-4270/? W/System.err﹕ at com.firebase.tubesock.WebSocket.createSocket(WebSocket.java:271) 03-20 11:21:50.015 4255-4270/? W/System.err﹕ ... 4 more
I have found the next StackOverflow solution to the issue : http://stackoverflow.com/questions/28855164/fixing-javax-net-ssl-sslpeerunverifiedexception-no-peer-certificate
Do you think there is a way that I can call the "setHostname" method on the WebSocket object?
FYI- This repo is not receiving active development. Your best bet may be to fork it if you need changes.
Oh, ok, no problem I'm gonna leave this issue here in case somebody runs into it. Is it okay?
Of course! I just wanted to give you a heads-up.