phansier/Coffeegram

WASM working issue

Opened this issue · 2 comments

Site not working. Initially because of skiko.js 404

skiko.js usage from index.html was deprecated

Next problem was with Material3 usage:

unreachable
RuntimeError: unreachable
    at <Coffeegram:cmp-common>.kotlin.wasm.internal.throwLinkageError (http://localhost:8080/6593a0ac54dd2f613fb8.wasm:wasm-function[12942]:0x3a6f85)
    at <Coffeegram:cmp-common>.androidx.compose.material3.MinimumInteractiveModifierNode.measure (http://localhost:8080/6593a0ac54dd2f613fb8.wasm:wasm-function[61752]:0x7ee2c3)
    at <Coffeegram:cmp-common>.androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure (http://localhost:8080/6593a0ac54dd2f613fb8.wasm:wasm-function[43515]:0x65d5cb)

To see this log I've added to module's build.gradle.kts

tasks.withType<KotlinJsCompile>().configureEach {
    kotlinOptions.freeCompilerArgs += listOf("-Xwasm-use-traps-instead-of-exceptions")
}
unreachable
RuntimeError: unreachable
    at <Coffeegram:cmp-common>.androidx.compose.runtime.$withFrameNanosCOROUTINE$0.doResume (http://localhost:8080/ad49d0d2903c2b772360.wasm:wasm-function[26356]:0x4b32f2)
    at <Coffeegram:cmp-common>.kotlin.coroutines.CoroutineImpl.resumeWith (http://localhost:8080/ad49d0d2903c2b772360.wasm:wasm-function[13482]:0x3bb169)
    at <Coffeegram:cmp-common>.kotlinx.coroutines.DispatchedTask.run (http://localhost:8080/ad49d0d2903c2b772360.wasm:wasm-function[15485]:0x3ecd93)
    at <Coffeegram:cmp-common>.androidx.compose.ui.platform.FlushCoroutineDispatcher$dispatch$slambda$lambda.invoke (http://localhost:8080/ad49d0d2903c2b772360.wasm:wasm-function[45944]:0x66c652)
    at <Coffeegram:cmp-common>.androidx.compose.ui.platform.FlushCoroutineDispatcher$dispatch$slambda$lambda.invoke (http://localhost:8080/ad49d0d2903c2b772360.wasm:wasm-function[45945]:0x66c65d)
    at <Coffeegram:cmp-common>.androidx.compose.ui.platform.FlushCoroutineDispatcher.performRun (http://localhost:8080/ad49d0d2903c2b772360.wasm:wasm-function[45983]:0x66d138)
    at <Coffeegram:cmp-common>.androidx.compose.ui.platform.FlushCoroutineDispatcher$dispatch$slambda.doResume (http://localhost:8080/ad49d0d2903c2b772360.wasm:wasm-function[45952]:0x66c877)
    at <Coffeegram:cmp-common>.androidx.compose.ui.platform.FlushCoroutineDispatcher$dispatch$slambda.invoke (http://localhost:8080/ad49d0d2903c2b772360.wasm:wasm-function[45950]:0x66c7d2)
    at <Coffeegram:cmp-common>.androidx.compose.ui.platform.FlushCoroutineDispatcher$dispatch$slambda.invoke (http://localhost:8080/ad49d0d2903c2b772360.wasm:wasm-function[45951]:0x66c81c)
    at <Coffeegram:cmp-common>.kotlin.coroutines.intrinsics.<no name provided>.doResume (http://localhost:8080/ad49d0d2903c2b772360.wasm:wasm-function[13505]:0x3bb72f)

jetbrainsCompose = "1.7.1" && 1.8.0-alpha01