Closed alexandersokol closed 1 year ago
hubConnection.on("ReceiveVisibilityStatus", {
Timber.i("Visibility status changed: ${it.userId} ${it.callStatus}")
}, VisibilityStatus::class.java)
What is this syntax?
Where is it
coming from? You aren't accepting any arguments in your lambda so the error makes complete sense. If you changed it to:
hubConnection.on("ReceiveVisibilityStatus", (it) -> {
Timber.i("Visibility status changed: ${it.userId} ${it.callStatus}")
}, VisibilityStatus::class.java)
Then it would likely work.
This is kotlin, it doesn't requires single lambda argument to be written, I mentioned that is Android app. Crash is inside signalR library, please check crash log.
An error log is not a crash. Is the client actually closing?
I ran a small app that didn't have the correct number of arguments in the .on
method and it just logs an error like expected, but the client keeps running.
Please provide a minimal repro app.
I understand your logic. I was also thinking that the problem is in argument or target class, but other subscriptions works well the same way. I need some time to make a sample app.
Issue was solved on client side. Seems it was an issue with incorrect subscription management across component's lifecycle changes.
Is there an existing issue for this?
Describe the bug
When Android Java client receives a message, signalR library rises internal exception during parsing that causes the whole client to fail. For other clients on front-end and iOS app it works well without any errors. I tried newer versions of the library but it doesn't have any effect.
Tested on Android versions 11, 12, 13, 14
Expected Behavior
Sdk receives new message without exception
Steps To Reproduce
Raw message received:
Mapping object:
Subscription:
Exceptions (if any)
.NET Version
No response
Anything else?
Back-end:
Microsoft.AspNetCore.SignalR (1.0.1) Microsoft.AspNetCore.SignalR.Common (3.1.3) Microsoft.AspNetCore.SignalR.Core (1.0.1) Microsoft.AspNetCore.SignalR.Protocols.Json (1.1.0) Microsoft.AspNetCore.SignalR.StackExchangeRedis (3.1.3)
Android:
com.microsoft.signalr:signalr:3.1.31 (also tested on 5.x, 6.x, 7.x, 8.x-preview with the same result)