GZipStream in WebGL

Good afternoon.

In version 6000.0.40f1, the game freezes when working with GZipStream.
This only happens in the release build, in the development build everything is fine.
DeflateStream and BrotliStream also do not work.

On the current version 2022.3.56f1 everything works correctly.

My publishing settings:

2 Likes

Hi,

Unfortunatley, this is a known bug: Unity Issue Tracker - The Player freezes on load when building Web platform

We are currently looking into it and I hope I can give you an update soon.

Thanks, I’ll be waiting.

As a workaround until the fix is available you can either disable “Decompression Fallback”(if thats work for you deployment target) or manually edit the .loader.js after a build:

You would need to remove these lines from the loader file:

R("workerUrl").then(function (e) {
    var t = URL.createObjectURL(new Blob([e], { type: "application/javascript" }));
    (w.compressedWorkerUrl = w.workerUrl),
        (w.workerUrl = t),
        w.deinitializers.push(function () {
            URL.revokeObjectURL(t);
        });
}),

Thanks, I’ll check it tomorrow

Just making sure: you aren’t opening the same project in one, then again in another (older) editor version?

Because that could be disastrous, as downgrading is not supported and serialization format of assets may change between versions.

If you work with project copies / backups then that’s fine.

I do this in separate git branches

“Decompression Fallback” and edits to loader.js did not help.

Thank you!

Removing this chunk of code from .loader.js helped fix the problem for me.
(I noticed that the problem was when using “Decompression Fallback”, but I wanted to use it in the future to reduce the start load time)

Unity version 6000.1.0.b6. Brotli compression and “Decompression Fallback” on