Hello. I've been having trouble making my wasm app...
# webassembly
t
Hello. I've been having trouble making my wasm app work on Edge and Firefox for months. (So i've just been running the js app on them instead.) I tried again today and still get an error that i cannot identify. I have no trouble running it on Chrome and the latest Safari. Has anyone ever had trouble running a wasm app on certain browsers ?
I get this on Edge on this line :
'kotlinx.coroutines.error_$external_fun' : (_this, p0) => _this.error(p0),
Copy code
JsException: x is undefined wasmJsApp.uninstantiated.mjs:190
    error_$external_fun wasmJsApp.uninstantiated.mjs:190
    error_$external_fun__externalAdapter 97d0a68fa25fa0bd8475.wasm:6769574
    propagateExceptionFinalResort 97d0a68fa25fa0bd8475.wasm:6771861
    handleUncaughtCoroutineException 97d0a68fa25fa0bd8475.wasm:6722674
    handleCoroutineException 97d0a68fa25fa0bd8475.wasm:6563488
    handleJobException 97d0a68fa25fa0bd8475.wasm:6549180
    finalizeFinishingState 97d0a68fa25fa0bd8475.wasm:6577204
    tryMakeCompletingSlowPath 97d0a68fa25fa0bd8475.wasm:6587157
    tryMakeCompleting 97d0a68fa25fa0bd8475.wasm:6586582
    makeCompletingOnce 97d0a68fa25fa0bd8475.wasm:6586273
    resumeWith 97d0a68fa25fa0bd8475.wasm:6545252
    resumeWith 97d0a68fa25fa0bd8475.wasm:6474868
    run 97d0a68fa25fa0bd8475.wasm:6728537
    process 97d0a68fa25fa0bd8475.wasm:6765198
    invoke 97d0a68fa25fa0bd8475.wasm:6770155
    invoke 97d0a68fa25fa0bd8475.wasm:6770164
    <xxx:composeApp>.kotlin.js.__callFunction_(()->Unit) 97d0a68fa25fa0bd8475.wasm:6454716
    kotlin.js.__convertKotlinClosureToJsClosure_(()->Unit)/< wasmJsApp.uninstantiated.mjs:126
    handler wasmJsApp.uninstantiated.mjs:199
    (Asynchrone : EventListener.handleEvent)
    subscribeToWindowMessages wasmJsApp.uninstantiated.mjs:202
    subscribeToWindowMessages__externalAdapter 97d0a68fa25fa0bd8475.wasm:6770631
    <xxx:composeApp>.kotlinx.coroutines.WindowMessageQueue.<init> 97d0a68fa25fa0bd8475.wasm:6770280
    <xxx:composeApp>.kotlinx.coroutines.WindowDispatcher.<init> 97d0a68fa25fa0bd8475.wasm:6762542
    createDefaultDispatcher 97d0a68fa25fa0bd8475.wasm:6769371
    <xxx:composeApp>.kotlinx.coroutines.Dispatchers.<init> 97d0a68fa25fa0bd8475.wasm:6766129
    Dispatchers_getInstance 97d0a68fa25fa0bd8475.wasm:6766289
    <xxx:composeApp>.androidx.compose.ui.window.ComposeWindow.<init> 97d0a68fa25fa0bd8475.wasm:9614483
    ComposeViewport 97d0a68fa25fa0bd8475.wasm:9603910
    ComposeViewport 97d0a68fa25fa0bd8475.wasm:9601953
    main 97d0a68fa25fa0bd8475.wasm:15475789
    _initialize 97d0a68fa25fa0bd8475.wasm:15517672
    instantiate wasmJsApp.uninstantiated.mjs:6839
    <anonyme> wasmJsApp.mjs:7
    a wasmJsApp.js:468
    <anonyme> wasmJsApp.mjs:1
    mjs wasmJsApp.js:364
    __webpack_require__ wasmJsApp.js:402
    <anonyme> wasmJsApp.js:1546
    <anonyme> wasmJsApp.js:1549
    webpackUniversalModuleDefinition wasmJsApp.js:17
    <anonyme> wasmJsApp.js:18
And this on Firefox on the same line :
Copy code
JsException: x is undefined wasmJsApp.uninstantiated.mjs:190
    error_$external_fun wasmJsApp.uninstantiated.mjs:190
    error_$external_fun__externalAdapter 97d0a68fa25fa0bd8475.wasm:6769574
    propagateExceptionFinalResort 97d0a68fa25fa0bd8475.wasm:6771861
    handleUncaughtCoroutineException 97d0a68fa25fa0bd8475.wasm:6722674
    handleCoroutineException 97d0a68fa25fa0bd8475.wasm:6563488
    handleJobException 97d0a68fa25fa0bd8475.wasm:6549180
    finalizeFinishingState 97d0a68fa25fa0bd8475.wasm:6577204
    tryMakeCompletingSlowPath 97d0a68fa25fa0bd8475.wasm:6587157
    tryMakeCompleting 97d0a68fa25fa0bd8475.wasm:6586582
    makeCompletingOnce 97d0a68fa25fa0bd8475.wasm:6586273
    resumeWith 97d0a68fa25fa0bd8475.wasm:6545252
    resumeWith 97d0a68fa25fa0bd8475.wasm:6474868
    run 97d0a68fa25fa0bd8475.wasm:6728537
    process 97d0a68fa25fa0bd8475.wasm:6765198
    invoke 97d0a68fa25fa0bd8475.wasm:6770155
    invoke 97d0a68fa25fa0bd8475.wasm:6770164
    <TopSpinBuilder:composeApp>.kotlin.js.__callFunction_(()->Unit) 97d0a68fa25fa0bd8475.wasm:6454716
    kotlin.js.__convertKotlinClosureToJsClosure_(()->Unit)/< wasmJsApp.uninstantiated.mjs:126
    handler wasmJsApp.uninstantiated.mjs:199
m
Because you explicitly asked for it. Yes, I have a project too which works nicely on Firefox and Chrome but Safari says it can’t parse the Wasm. All browsers are the latest versions of course.
t
@Michael Paus did you manage to pinpoint what is causing the issue or is it unclear ? Sometimes, the unexplained (for me) incompability drives me crazy.
m
It is completely unclear and probably a Safari issue, but it keeps me from publishing it. (Just in order to avoid misunderstanding. The code was not created from Kotlin.)
📝 1
🙏 1