.wasm files need to be served with mime-type application/wasm in order for it to work
run a wasm module.
Browser : google chrome
Operating System: mac os
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Issue closed due to lack of activity
@SaraVieira Can this be reopened? :)
It seems that CodeSandbox currently serves WASM binaries as application/octet-stream instead of application/wasm. This should probably be fixed from the serverside instead of the client.

Looks like it's probably because express is not up-to-date - 4.17 seems to have the fix (related issue). Not sure if this repo contains related code, but standalone-packages/codesandbox-browserfs has version 4.15.4 https://github.com/codesandbox/codesandbox-client/blob/13c9eda9bfaa38dec6a1699e31233bee388857bc/standalone-packages/codesandbox-browserfs/yarn.lock#L1443
Hey!
Reopened and let me ping @compuives
Sandbox binary assets (files) are actually served from a Google Cloud Storage bucket, and GCS doesn't have a custom MIME type for .wasm files, so it falls back to the default application/octet-stream. The solution is to explicitly set the Content-Type: application/wasm header for .wasm files when we upload them to GCS. This might also be an issue for other "exotic" file types.
Cc @CompuIves
@hexrcs In the meanwhile, I manually set the proper content type for https://uploads.codesandbox.io/uploads/user/5b0619d8-6846-415b-b3f2-5f62a6b67a40/eRQ5-main.wasm, can you please confirm it's now working?
@lbogdan Yes it is :)
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
This issue has been automatically closed because there wasn't any activity after the previous notice or the stale label wasn't removed.
Hi!
I seem to be stuck on the same issue here. I still seem to be receiving an incorrect MIME type for WASM files in my Sandboxes.
Is there some way for me to set the proper content type manually like @lbogdan has done? I don't think https://uploads.codesandbox.io/ is meant to be accessed by me.
cc @SaraVieira @CompuIves
Oh yeah you're right! The server probably doesn't upload this file with the right mime types to the bucket, do you have time to double check this @sannek ?
What about .wasm files from npm packages? Not working for me, see e.g. https://codesandbox.io/s/friendly-yonath-is9ut
We've just (finally) deployed a fix for this, and .wasm files should now have the proper content types! Let me know if you encounter any further issues. Sorry it took so long!
Most helpful comment
Hey!
Reopened and let me ping @compuives