-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java(Android). Fatal Exception: java.lang.RuntimeException. Connection is not active. #29457
Comments
The first exception will be fixed in 5.0.3 #29249 The second exception is something we haven't seen before, it might also be fixed in 5.0.3 but I'd be interested if you have more details such as logs and repro steps. |
The second exception is really weird.
I share you a gist (java class) from our app that contains all socket logic. The key lines are 73, 125, 136, 144, 148. https://gist.github.com/SergeyKharuk/df462add7dc0b206be63beef9262a643 |
I have a third assumption. my proguard-rules.pro file https://gist.github.com/SergeyKharuk/f7bc59c328662fd39232c80bfd87eba8 |
Thanks for contacting us. |
We have had that weird second crash as well. From our logs it seems like the user was in the background, an connection was started but then a failure occurred and we tried to reconnect.
|
Hello) One more trouble, we have also third type of crash that have a lot of cases on Firebase Crashlytics. It was even in previous version of signalR we used (5.0.2). *Change current issue title, maybe) |
@SergeyKharuk We have noticed that same crash. I had made an issue for it previously: #28608 |
Glad to hear it! Closing as the original issue looks to be fixed, the other issue is being tracked by #28608 |
Hello.
We have in production an Android app that uses 'com.microsoft.signalr:signalr:5.0.1' for socket connection.
The app was received few weird crashes.
The following stacktrace of different crashes is taken from firebase crashlytics:
Fatal Exception: java.lang.RuntimeException: Connection is not active. at com.microsoft.signalr.HubConnection$ReconnectingConnectionState.getConnectionStateUnsynchronized(HubConnection.java:1484) at com.microsoft.signalr.HubConnection.stopConnection(HubConnection.java:522) at com.microsoft.signalr.HubConnection.lambda$start$6(HubConnection.java:279) at com.microsoft.signalr.HubConnection.lambda$start$6$HubConnection(HubConnection.java) at com.microsoft.signalr.-$$Lambda$HubConnection$EkdUEf1TbIWyqrPvoiabHmwDEmY.invoke(-.java:2) at com.microsoft.signalr.WebSocketTransport.onClose(WebSocketTransport.java:90) at com.microsoft.signalr.WebSocketTransport.lambda$start$1(WebSocketTransport.java:55) at com.microsoft.signalr.WebSocketTransport.lambda$start$1$WebSocketTransport(WebSocketTransport.java) at com.microsoft.signalr.-$$Lambda$WebSocketTransport$fejcvJEcEEhKZWxrg8q1qfE4F-g.invoke(-.java:2) at com.microsoft.signalr.OkHttpWebSocketWrapper$SignalRWebSocketListener.onFailure(OkHttpWebSocketWrapper.java:148) at okhttp3.internal.ws.RealWebSocket.failWebSocket(RealWebSocket.java:592) at okhttp3.internal.ws.RealWebSocket$WriterTask.runOnce(RealWebSocket.java:622) at okhttp3.internal.concurrent.TaskRunner.runTask(TaskRunner.java:116) at okhttp3.internal.concurrent.TaskRunner.access$getLogger$cp(TaskRunner.java:42) at okhttp3.internal.concurrent.TaskRunner$runnable$1.run(TaskRunner.java:65) at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:929)
Fatal Exception: java.lang.RuntimeException: The HubConnection failed to transition from the 'CONNECTED' state to the 'DISCONNECTED' state because it was actually in the 'DISCONNECTED' state. at com.microsoft.signalr.HubConnection$ReconnectingConnectionState.changeState(HubConnection.java:61) at com.microsoft.signalr.HubConnection.stopConnection(HubConnection.java:76) at com.microsoft.signalr.HubConnection.lambda$start$6(HubConnection.java) at com.microsoft.signalr.HubConnection.lambda$start$6$HubConnection(HubConnection.java) at com.microsoft.signalr.-$$Lambda$HubConnection$EkdUEf1TbIWyqrPvoiabHmwDEmY.invoke(-.java:2) at com.microsoft.signalr.WebSocketTransport.onClose(WebSocketTransport.java:24) at com.microsoft.signalr.WebSocketTransport.lambda$start$1(WebSocketTransport.java:4) at com.microsoft.signalr.WebSocketTransport.lambda$start$1$WebSocketTransport(WebSocketTransport.java) at com.microsoft.signalr.-$$Lambda$WebSocketTransport$fejcvJEcEEhKZWxrg8q1qfE4F-g.invoke(-.java:2) at com.microsoft.signalr.OkHttpWebSocketWrapper$SignalRWebSocketListener.onFailure(OkHttpWebSocketWrapper.java:70) at okhttp3.internal.ws.RealWebSocket.failWebSocket(RealWebSocket.java:38) at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.java:133) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.java:60) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764)
Is there a workaround? Will this be fixed in future versions of signalR?
The text was updated successfully, but these errors were encountered: