Closed aquagray closed 1 week ago
+1
And does anyone know how a workaround to get wasm working in any form? Should we not use wasm at all until this is fixed?
Update: Nevermind, found a workaround. 8080 port is bound by some other executable on Mac.
Using any other port works:
browser {
commonWebpackConfig {
outputFileName = "composeApp.js"
devServer = (devServer ?: KotlinWebpackConfig.DevServer(port = 8081)) // <- here
}
}
UPD2: NVM still crashes, just not at the start
I'm experiencing a similar (though not identical, sorry if this is in the wrong place) issue with my own project. This occurs specifically when loading it in an Android Chromium webview, it works fine in Firefox/Chrom(ium) on both Linux and Android. Nothing is outputted by the wasmJsRun
task.
Edit: Never mind, further testing showed that that really was just an info log. There was something wrong with my webview implementation that prevented it from displaying the Compose project. With a separate implementation that did allow it to display, the same error was still outputted so it seems to be unrelated.
04-25 01:01:21.926 14706 14706 I chromium: [INFO:CONSOLE(124)] "Error: Fail to fetch
04-25 01:01:21.926 14706 14706 I chromium: at kotlin.captureStackTrace (webpack-internal:///./kotlin/slai.uninstantiated.mjs:21:44)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.kotlin.captureStackTrace__externalAdapter (http://192.168.123.122:8080/slai.wasm:wasm-function[13077]:0x3b98e3)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.kotlin.Throwable.<init> (http://192.168.123.122:8080/slai.wasm:wasm-function[13064]:0x3b9702)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.kotlin.Error.<init> (http://192.168.123.122:8080/slai.wasm:wasm-function[12429]:0x3ad6aa)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.io.ktor.client.engine.js.compatibility.commonFetch$lambda.invoke (http://192.168.123.122:8080/slai.wasm:wasm-function[80507]:0x79d59d)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.io.ktor.client.engine.js.compatibility.commonFetch$lambda.invoke (http://192.168.123.122:8080/slai.wasm:wasm-function[80508]:0x79d5e3)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.kotlin.js.__callFunction_((Js)->Js?) (http://192.168.123.122:8080/slai.wasm:wasm-function[13167]:0x3ba57a)
04-25 01:01:21.926 14706 14706 I chromium: at eval (webpack-internal:///./kotlin/slai.uninstantiated.mjs:143:125)
04-25 01:01:21.926 14706 14706 I chromium: Caused by: JsError: Error from javascript[TypeError: Failed to fetch].
04-25 01:01:21.926 14706 14706 I chromium: at kotlin.captureStackTrace (webpack-internal:///./kotlin/slai.uninstantiated.mjs:21:44)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.kotlin.captureStackTrace__externalAdapter (http://192.168.123.122:8080/slai.wasm:wasm-function[13077]:0x3b98e3)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.kotlin.Throwable.<init> (http://192.168.123.122:8080/slai.wasm:wasm-function[13064]:0x3b9702)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.kotlin.Throwable.<init> (http://192.168.123.122:8080/slai.wasm:wasm-function[13067]:0x3b9777)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.io.ktor.client.engine.js.JsError.<init> (http://192.168.123.122:8080/slai.wasm:wasm-function[80458]:0x79c205)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.io.ktor.client.engine.js.compatibility.commonFetch$lambda.invoke (http://192.168.123.122:8080/slai.wasm:wasm-function[80507]:0x79d599)
04-25 01:01:21.926 14706 14706 I chromium: at <slai:shared>.io.ktor.client.engine.js.compatibility.commonFetch$lambda.invoke (http://192.168.123.122:8080/slai.wasm:wasm-function[80508]:0x79d5e3)
04-25 01:01:21.926 14706 14706 I chromium: ... and 2 more common stack frames skipped
04-25 01:01:21.926 14706 14706 I chromium: ", source: webpack-internal:///./kotlin/slai.uninstantiated.mjs (124)
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug Downloaded the default project for web app, and it crashes.
Affected platforms
Versions
To Reproduce Steps and/or the code snippet to reproduce the behavior:
https://kmp.jetbrains.com/ Download "web" project Open using latest intellij "community edition 2023.3.4"
Expected behavior default web app works.
Screenshots
From ide:
From browser:
Additional context