WebGL doesn't work on chrome!?

Hi.

I have had an error that is weird!!! I have built my project as WebGL by release and compressed!!

I have uploaded it on local server(IIS 10) and it’s working in edge and firefox but doesn’t work on chrome!!!

This is my web.config file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <staticContent>
            <mimeMap fileExtension=".mem" mimeType="application/octet-stream" />
            <mimeMap fileExtension=".data" mimeType="application/octet-stream" />
            <mimeMap fileExtension=".memgz" mimeType="application/octet-stream" />
            <mimeMap fileExtension=".datagz" mimeType="application/octet-stream" />
            <mimeMap fileExtension=".jsgz" mimeType="application/x-javascript" />
        </staticContent>
    <urlCompression doStaticCompression="true" doDynamicCompression="false"/>
    </system.webServer>
</configuration>

This is my error in chrome!!

Failed to load resource: the server responded with a status of 404 (Not Found)
UnityLoader.js:1 Decompressed Release/WebGL.memgz in 234ms. You can remove this delay if you configure your web server to host files using gzip compression.
UnityLoader.js:1 Decompressed Release/WebGL.datagz in 126ms. You can remove this delay if you configure your web server to host files using gzip compression.
UnityLoader.js:1 Decompressed Release/WebGL.jsgz in 725ms. You can remove this delay if you configure your web server to host files using gzip compression.
UnityLoader.js:1 optimizing out Math.fround calls
UnityLoader.js:1 Invoking error handler due to
Uncaught RangeError: Invalid typed array length
blob:http%3A//localhost/f1663393-0e54-4c4d-8eed-f5cadfe3abc4:1 Uncaught RangeError: Invalid typed array length

I really don’t know what’s going on!??

Hello developer1992.

If you want your build to run on 32-bit Chrome, use less than 1GB memory for heap. Normally it should work well with about 768MB i.e. set TOTAL_MEMORY: 805306368 or less in your index.html
(by the way, doStaticCompression does not apply here, as content is already compressed, also, .jsgz is a compressed file and should normally have application/octet-stream mime type)

Hi alexsuvorov,

I really appreciated! I was working on something else, I just saw your answer. My problem was about heap size! I’ve solved it by your help!

Thanks a lot