Skip to content

[SignalR] Java Client NullPointerException #6898

@JMaroz

Description

@JMaroz

Describe the bug

When start the connection the SignalR HubConnection class throw an Exception

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.microsoft.signalr.HubConnection$ConnectionState.cancelOutstandingInvocations(java.lang.Exception)' on a null object reference at com.microsoft.signalr.HubConnection.stopConnection(HubConnection.java:6) at com.microsoft.signalr.HubConnection.lambda$start$6(HubConnection.java:1) at com.microsoft.signalr.s.invoke(Unknown Source:2) at com.microsoft.signalr.WebSocketTransport.onClose(WebSocketTransport.java:4) at com.microsoft.signalr.WebSocketTransport.lambda$start$1(WebSocketTransport.java:3) at com.microsoft.signalr.A.invoke(Unknown Source:2) at com.microsoft.signalr.OkHttpWebSocketWrapper$SignalRWebSocketListener.onFailure(OkHttpWebSocketWrapper.java:3) at okhttp3.internal.ws.RealWebSocket.failWebSocket(RealWebSocket.java:84) at okhttp3.internal.ws.RealWebSocket$2.onFailure(RealWebSocket.java:1) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:8) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:3) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)

To Reproduce

Unable to reproduce the behavior, the crash happen randomly

Expected behavior

SignalR must catch the exception or not throw the exception

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-signalrIncludes: SignalR clients and servers

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions