question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect response MIME type. Expected 'application/wasm'

See original GitHub issue

Hello. Nice work of yours! I’ve used some of your code in my demo in research purposes. Tested it and your demo on my old Linux Mint notebook and these errors appear when webgl processing is trying to start: wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'. and then as a result: Uncaught (in promise) TypeError: Cannot read property 'VERTEX_SHADER' of null OS is:

# lsb_release -a
No LSB modules are available.
Distributor ID:	LinuxMint
Description:	Linux Mint 19.3 Tricia
Release:	19.3
Codename:	tricia

Browser is:

# apt show chromium-browser
Package: chromium-browser
Version: 90.0.4430.93-0ubuntu0.18.04.1

chrome://gpu contains:

Graphics Feature Status
Canvas: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Disabled
Out-of-process Rasterization: Hardware accelerated
OpenGL: Enabled
Rasterization: Hardware accelerated on all pages
Skia Renderer: Enabled
Video Decode: Hardware accelerated
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated

Does my notebook have some hw or sw incompatibles with wasm? Thanks.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
drlight17commented, May 13, 2021

Hello @drlight17 and thanks! Are you serving the app with create-react-app dev server (aka webpack-dev-server)? This should be the case if you run yarn start with this demo project.

No, this happen even if I try to open your hosted demo at the link https://volcomix.github.io/virtual-background/

The dev server is supposed to set the right MIME type for wasm files in response headers. If you are using another web server, I guess there are some config to add.

Otherwise, this error can also happen when the wasm file is not found by the dev server, in which case it returns the index.html file instead (which obviously won’t have the wasm MIME type). Have you checked the response body in the network tab of your browser devtools?

No, but I’ll check and tell you a little later.

0reactions
Volcomixcommented, May 29, 2021

I don’t see anything wrong with your hardware or software @drlight17. I tried installing Chromium to check potential incompatibilities and both wasm and SIMD seem working. Chromium version was 91 though. Maybe you could try updating yours but I don’t have other ideas for now.

Unless you have more insights regarding response headers and error details from the browser console, I’m gonna close the issue. Thanks.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrect response MIME type. Expected 'application/wasm ...
Since application/wasm isn't an official MIME type yet, WebAssembly/spec#573, in case you got the type error of an incorrect response MIME ...
Read more >
TypeError: Failed to execute 'compile' on 'WebAssembly ...
'Uncaught (in promise) TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.' Here ...
Read more >
Incorrect response MIME type. Expected 'application/wasm'.
The error I'm running across is "TypeError: Incorrect response MIME type. Expected 'application/wasm'." when trying to run this bit of code... <script>.
Read more >
Incorrect response MIME type. Expected 'application/wasm'
Error: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'. There is 2 ways to fix the issue:.
Read more >
WebAssembly doesn't work on Firefox/Chrome due to missing ...
WebAssembly's MIME type is application/wasm . If not set; Firefox, Chrome and Vivaldi won't be able to run the WASM. Here's the Chrome...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found