Stan van der Bend
12/29/2024, 11:35 AM[versions]
androidx-lifecycle = "2.8.4"
compose-multiplatform = "1.7.0"
junit = "4.13.2"
kotlin = "2.1.0"
Created an issue:
https://youtrack.jetbrains.com/issue/KT-74169/WasmJS-coroutines-errorStan van der Bend
12/29/2024, 11:37 AMcomposeApp.uninstantiated.mjs:185 JsException: Exception was thrown while running JavaScript code
kotlinx.coroutines.error_$external_fun @ composeApp.uninstantiated.mjs:185
$kotlinx.coroutines.error_$external_fun__externalAdapter @ 510710f….wasm:0x311633
$kotlinx.coroutines.internal.propagateExceptionFinalResort @ 510710f….wasm:0x311f02
$kotlinx.coroutines.internal.handleUncaughtCoroutineException @ 510710f….wasm:0x3058fa
$kotlinx.coroutines.handleCoroutineException @ 510710f….wasm:0x2e5e29
$kotlinx.coroutines.StandaloneCoroutine.handleJobException @ 510710f….wasm:0x2e23d7
$kotlinx.coroutines.JobSupport.finalizeFinishingState @ 510710f….wasm:0x2e922a
$kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath @ 510710f….wasm:0x2eb6d8
$kotlinx.coroutines.JobSupport.tryMakeCompleting @ 510710f….wasm:0x2eb4b2
$kotlinx.coroutines.JobSupport.makeCompletingOnce @ 510710f….wasm:0x2eb373
$kotlinx.coroutines.AbstractCoroutine.resumeWith @ 510710f….wasm:0x2e1eab
$kotlin.coroutines.CoroutineImpl.resumeWith @ 510710f….wasm:0x26976d
$kotlinx.coroutines.DispatchedTask.run @ 510710f….wasm:0x307195
$androidx.compose.ui.platform.FlushCoroutineDispatcher$dispatch$slambda$lambda.invoke @ 510710f….wasm:0x4e0274
$androidx.compose.ui.platform.FlushCoroutineDispatcher$dispatch$slambda$lambda.invoke @ 510710f….wasm:0x4e027f
$androidx.compose.ui.platform.FlushCoroutineDispatcher.performRun @ 510710f….wasm:0x4e0dc2
$androidx.compose.ui.platform.FlushCoroutineDispatcher$dispatch$slambda.doResume @ 510710f….wasm:0x4e04a4
$androidx.compose.ui.platform.FlushCoroutineDispatcher$dispatch$slambda.invoke @ 510710f….wasm:0x4e03f4
$androidx.compose.ui.platform.FlushCoroutineDispatcher$dispatch$slambda.invoke @ 510710f….wasm:0x4e043e
$kotlin.coroutines.intrinsics.<no name provided>.doResume @ 510710f….wasm:0x269c93
$kotlin.coroutines.CoroutineImpl.resumeWith @ 510710f….wasm:0x2696b2
$kotlinx.coroutines.DispatchedTask.run @ 510710f….wasm:0x307195
$kotlinx.coroutines.MessageQueue.process @ 510710f….wasm:0x310cb2
$kotlinx.coroutines.WindowMessageQueue$process$ref.invoke @ 510710f….wasm:0x31181a
$kotlinx.coroutines.WindowMessageQueue$process$ref.invoke @ 510710f….wasm:0x311824
$kotlin.js.__callFunction_(()->Unit) @ 510710f….wasm:0x264ffc
eval @ composeApp.uninstantiated.mjs:125
Promise.then
eval @ composeApp.uninstantiated.mjs:187
kotlinx.coroutines.__callJsClosure_(()->Unit) @ composeApp.uninstantiated.mjs:188
$kotlinx.coroutines.__JsClosureToKotlinClosure_(()->Unit).invoke @ 510710f….wasm:0x311a16
$kotlinx.coroutines.__JsClosureToKotlinClosure_(()->Unit).invoke @ 510710f….wasm:0x311a1e
$kotlinx.coroutines.WindowMessageQueue.schedule @ 510710f….wasm:0x311947
$kotlinx.coroutines.MessageQueue.enqueue @ 510710f….wasm:0x310c1b
$kotlinx.coroutines.WindowDispatcher.dispatch @ 510710f….wasm:0x310235
$kotlinx.coroutines.JsMainDispatcher.dispatch @ 510710f….wasm:0x30f97a
$kotlinx.coroutines.internal.resumeCancellableWith @ 510710f….wasm:0x306908
$kotlinx.coroutines.intrinsics.startCoroutineCancellable @ 510710f….wasm:0x309bec
$kotlinx.coroutines.intrinsics.startCoroutineCancellable$default @ 510710f….wasm:0x309c2a
$kotlinx.coroutines.CoroutineStart.invoke @ 510710f….wasm:0x2e65c9
$kotlinx.coroutines.AbstractCoroutine.start @ 510710f….wasm:0x2e1f9f
$kotlinx.coroutines.launch @ 510710f….wasm:0x2e22b1
$kotlinx.coroutines.launch$default @ 510710f….wasm:0x2e22e6
$androidx.compose.ui.platform.GlobalSnapshotManager.ensureStarted @ 510710f….wasm:0x4e14fa
$androidx.compose.ui.scene.BaseComposeScene.<init> @ 510710f….wasm:0x4e6c09
$androidx.compose.ui.scene.CanvasLayersComposeSceneImpl.<init> @ 510710f….wasm:0x4e96e5
$androidx.compose.ui.scene.CanvasLayersComposeScene @ 510710f….wasm:0x4e7e04
$androidx.compose.ui.scene.CanvasLayersComposeScene$default @ 510710f….wasm:0x4e7e9d
$androidx.compose.ui.window.ComposeWindow.<init> @ 510710f….wasm:0x4f4dd7
$androidx.compose.ui.window.ComposeViewport @ 510710f….wasm:0x4f2899
$org.example.project.main @ main.kt:9
$_initialize @ 510710f….wasm:0x5a5815
instantiate @ composeApp.uninstantiated.mjs:4481
await in instantiate
eval @ composeApp.mjs:6
await in eval
__webpack_require__.a @ composeApp.js:447
eval @ composeApp.mjs:1
./kotlin/composeApp.mjs @ composeApp.js:332
__webpack_require__ @ composeApp.js:381
(anonymous) @ composeApp.js:1516
(anonymous) @ composeApp.js:1519
webpackUniversalModuleDefinition @ composeApp.js:17
(anonymous)
Stan van der Bend
12/29/2024, 11:57 AMStan van der Bend
12/29/2024, 12:14 PMArtem Kobzar
01/01/2025, 3:01 PMkotlin {
wasmJs {
compilerOptions {
freeCompilerArgs.add("-Xwasm-attach-js-exception")
}
}
}
It will show you what is the original JS exception was thrown (on Chrome it should work)