It seems adding `implementation("io.ktor:ktor-clie...
# ktor
m
It seems adding
implementation("io.ktor:ktor-client-core:3.0.1")
to my commonMain dependencies is causing the JS IR compiler to fail, is this a known bug?
a
I've never seen this issue before. Can you please file it?
m
Filed as KT-73186
What should I do until this is fixed? I tried switching my web target to wasmJs, but there I'm getting
Copy code
template-site-site-frontend-web.uninstantiated.mjs:120 Uncaught (in promise) ReferenceError: getCachedJsObject is not defined
    at kotlin.wasm.internal.getCachedJsObject_$external_fun (template-site-site-frontend-web.uninstantiated.mjs:120:78)
    at <com.martmists.template:site-frontend>.kotlin.wasm.internal.getCachedJsObject_$external_fun__externalAdapter (template-site-site-frontend-web.wasm:0x3c8e19)
    at <com.martmists.template:site-frontend>.kotlin.wasm.internal.externRefToAny (template-site-site-frontend-web.wasm:0x3c8b92)
    at <com.martmists.template:site-frontend>.kotlin.wasm.internal.jsToKotlinAnyAdapter (template-site-site-frontend-web.wasm:0x3c8b65)
    at <com.martmists.template:site-frontend>.androidx.compose.ui.window.CanvasBasedWindow (template-site-site-frontend-web.wasm:0x62507c)
    at <com.martmists.template:site-frontend>.androidx.compose.ui.window.CanvasBasedWindow$default (template-site-site-frontend-web.wasm:0x6251fa)
    at <com.martmists.template:site-frontend>.com.martmists.template.frontend.runComposeApp (template-site-site-frontend-web.wasm:0x815b71)
    at <com.martmists.template:site-frontend>.main (template-site-site-frontend-web.wasm:0x815dbb)
    at <com.martmists.template:site-frontend>.kotlin.wasm.internal.mainCallsWrapper (template-site-site-frontend-web.wasm:0x81c064)
    at <com.martmists.template:site-frontend>._initialize (template-site-site-frontend-web.wasm:0x81c070)
which also seems to be a known issue: https://youtrack.jetbrains.com/issue/CMP-6658/ReferenceError-getCachedJsObject-is-not-defined-when-running-composeApp-WasmJs
a
Can you try placing the line in the wasmJs dependencies block?
m
which line?
a
implementation("io.ktor:ktor-client-core:3.0.1")
m
Getting the same error, though at this point I'm not 100% sure if it's a ktor issue? The comments seem to imply it's related to ktor, but the stacktrace comes from Compose, and apparently the solution was in downgrading kx.serialization? Though that didn't work for me.