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. 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 (5)

  1. ldtj385

    Jan 31, 2022 16:13

    2020.3.26f1 still has this error

  2. tomkail_betterup

    Jan 06, 2022 12:16

    We're also seeing this on 2020.2.6, without "name files as hashes"

  3. larskroll

    Sep 06, 2021 11:33

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

  4. AdrianGTR

    Mar 27, 2021 21:22

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

  5. 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