:mega: Finally, we have the last release candidat...
# ktor
📣 Finally, we have the last release candidate,
It’s time to test and migrate, the final release is coming after New Year Holidays. See the migration page: https://ktor.io/quickstart/migration/1.3.0.html 🎄 Please note that we have long New Year Holidays here so no worries if we don’t respond quickly.
🎉 8
👍 2
Does this release work with background threads on native targets (iOS)?
I hope so, it should
Does this release include support for the Linux targets with Ktor Server?
@cy any chance you guys could take a look at this web sockets problem I have had for a while - unknown protocol: ws (
Copy code
try {
    <http://wsclient.ws|wsclient.ws> (
        method = HttpMethod.Get,
        host = hostn,
        port = portn, path = "/ws"
    ) {
        send(Frame.Text("Android client connecting"))
I originally experienced this with an android phone client, and then it just went away on its ownAdded a wearos project, same problem (they are both using the same shared common lib), but here it's just not going away
by went away on its own, I mean I didn't do anything - had this error continuously for a number of builds, and then suddenly it worked. I don't know how to explain it. Unfortunately no such mysterious luck with the wearos counterpart
@napperley No, it is planned to 1.4.0
👍 1
@Dmitri Sh it looks like you are trying to use Android Client engine with websockets that is not supported (and will never be supported due to the underlying implementation). Use OkHttp or other engines for websocket support
@cy well it does work with Android phone client. And I use cio engine - here is my two source sets for common and android
Copy code
sourceSets["commonMain"].dependencies {
    // Serialize
    implementation ("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:0.14.0")

    implementation ("io.ktor:ktor-client-core:$ktorversion")

    implementation ("io.ktor:ktor-client-json:$ktorversion")
    implementation ("io.ktor:ktor-client-logging:$ktorversion")
    implementation ("io.ktor:ktor-client-serialization:$ktorversion")
    implementation ("io.ktor:ktor-client-cio:$ktorversion")


sourceSets["androidMain"].dependencies {
    implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3")

    implementation ("io.ktor:ktor-client-android:$ktorversion")
    implementation ("io.ktor:ktor-client-core-jvm:$ktorversion")

    implementation ("io.ktor:ktor-client-json-jvm:$ktorversion")
    implementation ("io.ktor:ktor-client-logging-jvm:$ktorversion")
    implementation ("io.ktor:ktor-client-serialization-jvm:$ktorversion")
      //implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0")

So you include both
You need to include only one to be sure
Or, specify it when creating a client
ok thanks will try later today. is there any ref documentation on how to specify the engine when creating a client
@cy so I commented out android client and left just cio, now it works on both phone and wear os, many thanks! I am still puzzled though - both phone and wearos are really the same thing, using the same source set, and android client did work with web sockets for the phone, but not wear os. Strange. If you have a chance, is there anything else that is off in my sets? https://github.com/dmitrish/kinsight-multiplatform/blob/master/SharedCode/build.gradle.kts
thanks, checking it out
I have submitted an issue for background threads on native targets (iOS) https://github.com/ktorio/ktor/issues/1538