Hi, I am experimenting with building my compose mu...
# webassembly
t
Hi, I am experimenting with building my compose multiplatform app for Wasm. I got it working with the
wasmJsBrowserRun
command. No errors, runs great. However, when I try to run a release version using
wasmJsBrowserProductionRun
or
wasmJsBrowserDistribution
I get the following error in the browser console, and just a white page:
Copy code
Uncaught (in promise) CompileError: WebAssembly.instantiateStreaming(): Compiling function #33436 failed: type error in fallthru[0] (expected (ref null 23717), got (ref null 700)) @+15106059
I am using Kotlin 2.0.0. Is there anyway to debug this?
Screenshot 2024-05-30 at 17.25.20.png
r
Can you share the code?
t
Unfortunately not
It’s a huge project and building a production build takes a few minutes, so it is hard to just comment out some code and try again.
r
I would say, this kind of errors happen to me when doing some unsafe casting.
But I can't help more. Perhaps someone else will be able to decode the error code.
s
This looks like an optimizer bug. Could you share dev .wasm binary that works?
t
I can share it privately, will send it to you tomorrow.
s
Thanks! I’m interested in .wasm files from
build/compileSync/wasmJs/main/productionExecutable/{kotlin,optimized}/*.wasm
Alternatively, if you would be willing to a bit of digging into compiled wasm code, I could provide some tips to localize the part of the code that is causing this problem, without sharing the binaries.
136 Views