Closed sureshg closed 3 years ago
Can you try to use kotlin 1.4.32? 0.12.0 isn't quite ready for kotlin 1.5. Also, it's more looks like server exception. @yschimke can it be demo server error/bug?
Yep. I'll test tonight locally.
Didn't get to this yet. Plan is still to take your repro, apply to https://stackoverflow.com/questions/66397279/how-to-make-a-reproduction-of-a-bug-for-rsocket-kotlin and debug against a local rsocket-demo app (checkout and run http://github.com/rsocket/rsocket-demo in an IDE).
Thanks for the link, that was really helpful. Debugged locally and the issue was with not setting proper payload MIME types.
It started working after setting application/json
as payload MIME type.
val client = HttpClient {
install(WebSockets)
install(RSocketSupport) {
connector = RSocketConnector {
connectionConfig {
keepAlive = KeepAlive(interval = Duration.seconds(30), maxLifetime = Duration.minutes(2))
payloadMimeType = PayloadMimeType(data = "application/json", metadata = "application/json")
}
Frame
{
"data": null,
"dataMimeType": "application/binary",
"flags": "NO FLAGS (0x0)",
"keepAlive": 20000,
"length": 56,
"lifetime": 90000,
"majorVersion": 1,
"metadata": null,
"metadataMimeType": "application/binary",
"minorVersion": 0,
"resumeToken": null,
"streamId": 0,
"type": "SETUP (0x1)"
}
Frame
{
"data": null,
"flags": "NO FLAGS (0x0)",
"length": 10,
"metadata": null,
"requestN": 64,
"streamId": 1,
"type": "REQUEST_STREAM (0x6)"
}
- Successful Frames
Frame { "data": "hello world", "dataMimeType": "application/json", "flags": "NO FLAGS (0x0)", "keepAlive": 30000, "length": 63, "lifetime": 120000, "majorVersion": 1, "metadata": null, "metadataMimeType": "application/json", "minorVersion": 0, "resumeToken": null, "streamId": 0, "type": "SETUP (0x1)" } Frame { "data": null, "flags": "NO FLAGS (0x0)", "length": 10, "metadata": null, "requestN": 64, "streamId": 1, "type": "REQUEST_STREAM (0x6)" }
Sorry for the inconvenience, it is clear on the doc but somehow I missed it.
Thanks for the report we should improve some of these error messages
The following sample app compiled using
Kotlin/JS(IR)
is failing with513 Application Error
.Error