Firebase Realtime Database Websocket Exception Error while creating Secure Socket

Viewed 448

On Startup it works fine but after sometime it gives websocket error exception for realtime database with also cannot verify hostname.

D/WebSocket: ws_87 - closing itself D/Connection: conn_87 - Realtime connection failed D/Connection: conn_87 - closing realtime connection D/PersistentConnection: pc_0 - Got on disconnect due to OTHER D/PersistentConnection: pc_0 - Scheduling connection attempt D/ConnectionRetryHelper: Scheduling retry in 8773ms D/WebSocket: ws_87 - closed D/PersistentConnection: pc_0 - Trying to fetch auth token D/PersistentConnection: pc_0 - Successfully fetched token, opening connection D/Connection: conn_88 - Opening a connection D/WebSocket: ws_88 - WebSocket error. com.google.firebase.database.tubesock.WebSocketException: error while creating secure socket to wss://s-example.firebaseio.com/.ws?ns=fir-example at com.google.firebase.database.tubesock.WebSocket.createSocket(com.google.firebase:firebase-database@@16.0.5:332) at com.google.firebase.database.tubesock.WebSocket.runReader(com.google.firebase:firebase-database@@16.0.5:358) at com.google.firebase.database.tubesock.WebSocket.access$000(com.google.firebase:firebase-database@@16.0.5:47) at com.google.firebase.database.tubesock.WebSocket$2.run(com.google.firebase:firebase-database@@16.0.5:143) at java.lang.Thread.run(Thread.java:760) Caused by: javax.net.ssl.SSLPeerUnverifiedException: Cannot verify hostname: s-example.firebaseio.com at android.net.SSLCertificateSocketFactory.verifyHostname(SSLCertificateSocketFactory.java:205) at android.net.SSLCertificateSocketFactory.createSocket(SSLCertificateSocketFactory.java:537) at com.google.firebase.database.tubesock.WebSocket.createSocket(com.google.firebase:firebase-database@@16.0.5:318) at com.google.firebase.database.tubesock.WebSocket.runReader(com.google.firebase:firebase-database@@16.0.5:358) at com.google.firebase.database.tubesock.WebSocket.access$000(com.google.firebase:firebase-database@@16.0.5:47) at com.google.firebase.database.tubesock.WebSocket$2.run(com.google.firebase:firebase-database@@16.0.5:143) at java.lang.Thread.run(Thread.java:760) D/WebSocket: ws_88 - closing itself D/Connection: conn_88 - Realtime connection failed D/Connection: conn_88 - closing realtime connection D/PersistentConnection: pc_0 - Got on disconnect due to OTHER D/PersistentConnection: pc_0 - Scheduling connection attempt D/ConnectionRetryHelper: Scheduling retry in 13647ms D/WebSocket: ws_88 - closed

0 Answers
Related