Search Issue Tracker

Duplicate

Votes

1

Found in

2020.1.0a7

2020.1.0b1

2020.2

Issue ID

1229961

Regression

Yes

[WebGL] "wasm streaming compile failed" browser errors occur when launching any Unity project on a server

WebGL

-

How to reproduce:
1. Create a new Unity project
2. Build it for the WebGL platform
3. Launch the project on a localhost server (XAMPP was used in this case)
4. Inspect the browser page and navigate to its console

Expected result: browser console errors do not occur
Actual result: an empty Unity project causes a MIME type related error

Reproducible with: 2020.1.0a7, 2020.1.0b4, 2020.2.0a5
Not reproducible with: 2017.4.39f1, 2018.4.20f1, 2019.3.8f1, 2020.1.0a1, 2020.1.0a6

Notes:
1. Full errors:
1.1: wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
printErr @ 5.loader.js:31
1.2: falling back to ArrayBuffer instantiation
printErr @ 5.loader.js:31
2. If the WebGL build does not load in the browser, build with "Development Build" ticked in the Build Settings

  1. Response avatar

    Resolution Note:

    The following headers were missing on the server side:
    "Content-Type: application/wasm" for the WebAssembly module
    "Content-Type: application/javascript" for the framework code

    Additional issue mentioned by the user is related to https://fogbugz.unity3d.com/f/cases/1223772/

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.