Hello. Occasionally (1 of 20) iOS crashes when we ...
# ktor
v
Hello. Occasionally (1 of 20) iOS crashes when we are uploading a file with MiltiPart. The size of a file doesn't seem to matter. Darwin engine. 2.3.11 Ktor. 1.9.23 Kotlin. I see logging package in the stack trace. Although the logging plugin is not installed and dependency is not added to the project. When we had ktor-client-logging installed we had very often crashes even on download so we removed it. Any clues?
a
Seems like the
Logging
plugin is still installed. Otherwise, the track trace wouldn't contain that line.
v
Is there are way to make sure it is not? I guess it is installed by the ktor under the hood?
a
This plugin isn't installed by default.
v
Copy code
fun createHttpClient(json: Json, baseUrl: String): HttpClient {

            return HttpClient {

                install(ContentNegotiation) {
                    json(json)
                }

                // This crashes some iOS devices when we download big files
//                if (BuildUtils.isDevelopmentEnvironment) {
//                    install(Logging) {
//                        logger = Logger.DEFAULT
//                        level = LogLevel.ALL
//                    }
//                }

                defaultRequest {

                    url(baseUrl)

                    with (headers) {
                        append(name = "X-Client-Type", value = "xx")
                        append(name = "X-Client-Version", value = "yy")
                    }
                }
            }
        }
Copy code
implementation(libs.ktor.client.core)
            implementation(libs.ktor.client.content.negotiation)
            implementation(libs.ktor.client.auth)
//            implementation(libs.ktor.client.logging)
Whelp, but the line is there