I've been working with Kotlin/JS and Ktor's HTTP client, and although my multiplatform tests pass in JVM and native, they fail for JavaScript. The reason why is cryptic. If it helps, I'm using the IR compiler and targeting the NodeJS runtime. Is there any way to get better error messages for something like this?
Copy code
Error_0: Fail to fetch
Error_0: Fail to fetch
at _no_name_provided__246.invoke_1ti8hr(kotlin/multiplatform-sdk-end-to-end-tests-test.js:69724)
at <global>.<unknown>(/home/mjholler/Git/multiplatform-sdk/build/js/packages/multiplatform-sdk-end-to-end-tests-test/kotlin/multiplatform-sdk-end-to-end-tests-test.js:69752)
at <global>.processTicksAndRejections(internal/process/task_queues.js:93)
c
CLOVIS
08/04/2021, 8:41 AM
Hi! I've noticed that error with Karma tests. When running the project in browser, the standard library displays more information in the console tab. No idea if there's a similar solution for node.
CLOVIS
08/04/2021, 8:42 AM
In my experience that error could mean dozens of different things, but with the bonus info from the console it was easy to find the root cause
m
mike.holler
08/04/2021, 12:21 PM
Thanks, switching to the Legacy compiler helped generate a better error trace that made it clear what I was doing wrong.