wasm streaming compile failed

21 views
Skip to first unread message

キャロウ マーク

unread,
Jan 7, 2020, 8:22:46 PM1/7/20
to emscripten-discuss
When I run my JS app (in Firefox 71.0) that calls an Emscripten compiled module that uses embind to communicate with c++ code, I get the following error in the browser’s Web Console 2 times.

wasm streaming compile failed: TypeError: Response has unsupported MIME type

I am using the node.js http server module which I have just updated. Is there some mime-type setting I need to change to make streaming compile work? If so, how?

Regards

-Mark
signature.asc

Floh

unread,
Jan 8, 2020, 12:14:49 PM1/8/20
to emscripten-discuss
I get the same warning in Firefox when using node.js's http-server (I never noticed this before though, I guess it's a new Firefox feature), but the response content-type looks alright IMHO (application/wasm; charset=utf-8).

Interestingly, I used to get this JS warning in Chrome when using the python SimpleHttpServer module for serving, and this definitely did not set the right content-type for wasm files. Switching to node's http-server fixed this message in Chrome.

I guess it's a Firefox bug *shrugs*.

This is how I run http-server:

http-server -c-1 -g -o

"-o" opens the browser after starting
"-g" serves files compressed
"-c-1" disabled caching

Cheers!

Floh

unread,
Jan 8, 2020, 12:21:25 PM1/8/20
to emscripten-discuss
...hmmm, on the other hand I don't get the warning in Firefox on my emulators page via github pages, e.g.:



The returned content-type looks different: github pages returns only "application/wasm" while node's http-server returns "application/wasm; charset=utf-8", I guess Chrome is fine if "application/wasm" shows up anywhere in the content type, while Firefox doesn't like the "charset=utf-8".
Reply all
Reply to author
Forward
0 new messages