I have implemented SignalR in my Android application, but I have encountered some issues that are causing exceptions to be thrown.
An unexpected error occurred invoking ‘Subscribe’ on the server. TimeoutException: Ack-able message Microsoft.Azure.SignalR.Protocol.JoinGroupWithAckMessage(ackId: 7644) timed out. Fatal Exception: io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException
The exception was not handled due to missing onError handler in the subscribe() method call.com.microsoft.signalr.HubException: An unexpected error occurred invoking ‘Subscribe’ on the server. TimeoutException: Ack-able message Microsoft.Azure.SignalR.Protocol.JoinGroupWithAckMessage(ackId: 47043) timed out.
I have implemented it.
hubConnection?.start()?.blockingAwait()
if (hubConnection?.connectionState == HubConnectionState.CONNECTED) {
val con = hubConnection.invoke(
"Subscribe",
hubConnection.connectionId,
arrayListOf(
currentUserId,
currentUserId + "method_name",
currentUserId + "method_name",
currentUserId + "method_name",
currentUserId + "method_name",
currentUserId + "method_name",
currentUserId + "method_name"
)
)
con.doOnError { error ->
if (error != null) {
hubConnection.stop()
}
}
con.subscribe()
}
when any error occurs the con.doOnError does not catch that error