darkmoon_uk
11/16/2025, 7:17 AMdevelopment, fails for production
When I run my kotlinx-rpc enabled Web App using wasmJsBrowserDevelopmentRun it works,
but when I build/run with wasmJsBrowserDistribution or wasmJsBrowserProductionRun I get this crash at runtime:
Uncaught (in promise) IllegalStateException: Internal kotlinx.rpc error: Unable to find a service descriptor of the class MyRpcService
I guess this has to do with Webpack optimisations removing some symbol names etc.
But if this is an expected issue, shouldn't I be able to find a relevant warning/workaround in Kotlin/WASM or kotlinx-rpc documentation? Can't find anything.
Kotlin 2.2.21, RPC 0.10.1darkmoon_uk
11/16/2025, 9:23 AMAlexander Sysoev
11/16/2025, 9:25 AMdarkmoon_uk
11/16/2025, 11:37 AM2.2.20 + 0.10.0.
Sorry I ran out of time to probe further back to find out exactly where it broke.
If anyone needs a workaround: switching my CI from building:
From: wasmJsBrowserDistribution
⬇️
To: wasmJsBrowserDevelopmentExecutableDistribution
...and copying from the equivalent artifact folder, resulted in a successful working deployment for now.