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 (2020.1.X):

    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/

Comments (3)

  1. Ab8e179226548adb139c46aeda9f7723?d=mm

    larskroll

    Sep 06, 2021 11:33

    This is not a duplicate of issue #1223772: It also happens without name files as Hashes option.

  2. 1e3a0c49ee52bee9ed9b80e8da4c6ab6?d=mm

    AdrianGTR

    Mar 27, 2021 21:22

    Hi! 2020.3.1f1 here and same issue! Any idea? Thnx!

  3. 93cf4b6020289821f865cb67c3bdead9?d=mm

    avg-music

    Mar 26, 2021 18:33

    Hi there— I see that this is "resolved" on the duplicate issue, fixed for 2020.2.x, but I am using 2020.3.0f1 and I am experiencing the same exact issue. Could I be formatting something differently to avoid this error?

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.