Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Cannot connect to websocket on Android 4 #16

Description

@LucaAndrei

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions