:thinking_face: RPC on WASM - works for `developme...
# kotlinx-rpc
d
🤔 RPC on WASM - works for
development
, 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.1
This seems relevant
a
Looks like a compiler bug, I'll contact the team, thanks
👍 1
d
Can confirm this also affects
2.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.
thank you color 1