I’m not an expert in Kotlin WASM 🤔, but it sounds like you’re trying to pass an object from within WebAssembly to the outside environment. WebAssembly itself cannot directly pass objects because it operates on linear memory using pointers and offsets.
It’s the only thing that comes to my mind when I see the error “Cannot convert object to primitive type.” 🤷