Failed to asynchronously prepare wasm (table import 1 has a larger maximum size)

Hi, we have an issue while deploying a Unity WebGL build.

Error: UnityLoader.js:4 failed to asynchronously prepare wasm: LinkError: WebAssembly.instantiate(): table import 1 has a larger maximum size 32c93 than the module's declared maximum 207967

Unity version: 2019.4.14f1
Browser: Chrome Version 89.0.4389.90 (Official Build) (64-bit) - but it also happens in Firefox
Web Server: nginx
CDN for game files: Akamai

I have added the full log as an attachment.

What really bugs me is that it is NOT happening to everyone. We’re using the same browser version with cleared cache and cleared indexed db. At the moment we’re having 2 machines with the issue and 2 without the issue (game loads).

I’ll try to fiddle with WebGL memory settings, but what really bugs me is that the behavior is not consistent on all machines. Any idea what could potentially be a factor here? Thanks!

6976664–822851–unity_log_obfuscated.txt (3.95 KB)

1 Like

Update: the affected machines are behind a proxy server. When the proxy is disabled, it works. So it seems as if the proxy server is either caching and serving some old file versions or actively modifying content.

Even i am facing the same isse, but am not using any proxy. could you share what else could be wrong? I have tried by clearing my browser data too.

7599718--943117--Screenshot 2021-10-25 125746.png

The problem was that the proxy was caching data. So maybe something else is caching your data (e.g. the webserver).

The other thing that we enabled for our WebGL builds was this: Unity - Scripting API: PlayerSettings.WebGL.nameFilesAsHashes

This means that the artifacts produced by the WebGL build have a different name each time you build - and therefore cannot be cached.

2 Likes

All right, will check with the server part. something is definitely caching up the data. Thanks alot XD

thanks! the fix for me is to enable the “name files as hashes” setting in the Player Settings

Good information. Thanks!