You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed a guide on how to get this completed . I'm able to receive messages but the socket keeps connecting and disconnecting, Or it'll crash if I have an onError method with an exception stating that envelope is null.
Ultimately the main issue is having socket timeout exception keeps occurring and I have no clear idea of what is going on. Here's is the stack trace with the .onError implementation.
01-21 15:15:22.392 29408-29821/com.app W/Socket: WebSocket connection error java.net.SocketTimeoutException at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488) at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37) at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237) at okio.Okio$2.read(Okio.java:139) at okio.AsyncTimeout$2.read(AsyncTimeout.java:211) at okio.RealBufferedSource.request(RealBufferedSource.java:71) at okio.RealBufferedSource.require(RealBufferedSource.java:64) at okio.RealBufferedSource.readByte(RealBufferedSource.java:77) at com.squareup.okhttp.internal.ws.WebSocketReader.readHeader(WebSocketReader.java:110) at com.squareup.okhttp.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:99) at com.squareup.okhttp.internal.ws.RealWebSocket.readMessage(RealWebSocket.java:97) at com.squareup.okhttp.ws.WebSocketCall.createWebSocket(WebSocketCall.java:153) at com.squareup.okhttp.ws.WebSocketCall.access$000(WebSocketCall.java:40) at com.squareup.okhttp.ws.WebSocketCall$1.onResponse(WebSocketCall.java:98) at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:177) at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) 01-21 15:15:22.393 29408-29821/com.app W/Socket: Failed to explicitly close following failure 01-21 15:15:22.393 29408-29821/com.app E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher Process: com.app, PID: 29408 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.phoenixframework.channels.Envelope.getReason()' on a null object reference at org.phoenixframework.channels.Channel$5.onMessage(Channel.java:108) at org.phoenixframework.channels.Channel.trigger(Channel.java:156) at org.phoenixframework.channels.Socket.triggerChannelError(Socket.java:365) at org.phoenixframework.channels.Socket.access$1300(Socket.java:24) at org.phoenixframework.channels.Socket$PhoenixWSListener.onFailure(Socket.java:122) at com.squareup.okhttp.internal.ws.RealWebSocket.readerErrorClose(RealWebSocket.java:217) at com.squareup.okhttp.internal.ws.RealWebSocket.readMessage(RealWebSocket.java:100) at com.squareup.okhttp.ws.WebSocketCall.createWebSocket(WebSocketCall.java:153) at com.squareup.okhttp.ws.WebSocketCall.access$000(WebSocketCall.java:40) at com.squareup.okhttp.ws.WebSocketCall$1.onResponse(WebSocketCall.java:98) at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:177) at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
The text was updated successfully, but these errors were encountered:
I followed a guide on how to get this completed . I'm able to receive messages but the socket keeps connecting and disconnecting, Or it'll crash if I have an onError method with an exception stating that envelope is null.
Ultimately the main issue is having socket timeout exception keeps occurring and I have no clear idea of what is going on. Here's is the stack trace with the .onError implementation.
01-21 15:15:22.392 29408-29821/com.app W/Socket: WebSocket connection error java.net.SocketTimeoutException at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488) at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37) at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237) at okio.Okio$2.read(Okio.java:139) at okio.AsyncTimeout$2.read(AsyncTimeout.java:211) at okio.RealBufferedSource.request(RealBufferedSource.java:71) at okio.RealBufferedSource.require(RealBufferedSource.java:64) at okio.RealBufferedSource.readByte(RealBufferedSource.java:77) at com.squareup.okhttp.internal.ws.WebSocketReader.readHeader(WebSocketReader.java:110) at com.squareup.okhttp.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:99) at com.squareup.okhttp.internal.ws.RealWebSocket.readMessage(RealWebSocket.java:97) at com.squareup.okhttp.ws.WebSocketCall.createWebSocket(WebSocketCall.java:153) at com.squareup.okhttp.ws.WebSocketCall.access$000(WebSocketCall.java:40) at com.squareup.okhttp.ws.WebSocketCall$1.onResponse(WebSocketCall.java:98) at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:177) at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) 01-21 15:15:22.393 29408-29821/com.app W/Socket: Failed to explicitly close following failure 01-21 15:15:22.393 29408-29821/com.app E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher Process: com.app, PID: 29408 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.phoenixframework.channels.Envelope.getReason()' on a null object reference at org.phoenixframework.channels.Channel$5.onMessage(Channel.java:108) at org.phoenixframework.channels.Channel.trigger(Channel.java:156) at org.phoenixframework.channels.Socket.triggerChannelError(Socket.java:365) at org.phoenixframework.channels.Socket.access$1300(Socket.java:24) at org.phoenixframework.channels.Socket$PhoenixWSListener.onFailure(Socket.java:122) at com.squareup.okhttp.internal.ws.RealWebSocket.readerErrorClose(RealWebSocket.java:217) at com.squareup.okhttp.internal.ws.RealWebSocket.readMessage(RealWebSocket.java:100) at com.squareup.okhttp.ws.WebSocketCall.createWebSocket(WebSocketCall.java:153) at com.squareup.okhttp.ws.WebSocketCall.access$000(WebSocketCall.java:40) at com.squareup.okhttp.ws.WebSocketCall$1.onResponse(WebSocketCall.java:98) at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:177) at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
The text was updated successfully, but these errors were encountered: