Hi, I am developing a KMP Web application that com...
# compose-web
a
Hi, I am developing a KMP Web application that communicates with the network via API. I encountered a CORS issue when accessing a server running locally on my computer. This issue is easily resolved by changing the server settings. But now I encountered a new CORS issue. I am trying to generate artifacts using the command:
./gradlew wasmJsBrowserDistribution
The build is fine. But when I open the Web application on local machine, I get the following in the console:
Copy code
index.html:8 Access to XMLHttpRequest at 'file:///...2eaba8643e2ccdf352b4.wasm' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: chrome, chrome-extension, chrome-untrusted, data, http, https, isolated-app.
skiko.mjs:8 failed to asynchronously prepare wasm: [object ProgressEvent]
(anonymous) @ skiko.mjs:8
skiko.mjs:8 Aborted([object ProgressEvent])
V @ skiko.mjs:8
2eaba8643e2ccdf352b4.wasm:1 
        
        
       Failed to load resource: net::ERR_FAILED
skiko.mjs:8 Uncaught (in promise) RuntimeError: Aborted([object ProgressEvent]). Build with -sASSERTIONS for more info.
    at V (skiko.mjs:8:5457)
    at skiko.mjs:8:6918
I tried to make a minimal application distribution (created using KMP Wizard) but after running it I get the same error. Does this mean that the created artifacts are not usable? Or will everything work correctly when uploaded to the server?
👀 2
p
yeah, same here. I think it's something new, cause I don't remember having this problem before.
🫣 1
a
Just updated project to Compose Multiplatform 1.7.0, but have the same problem 🤕