Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug LinkError: WebAssembly.instantiate()

Discussion in 'WebGL' started by Moczan, Sep 18, 2020.

  1. Moczan

    Moczan

    Joined:
    Aug 11, 2017
    Posts:
    4
    I have a published game that I wanted to update today, made a WebGL build as always, uploaded to the server, everything worked but noticed I didn't update some of the data (just changing strings in ScriptableObjects). Quickly updated around 20 strings and since then I'm unable to build a working WebGL build of that project. The error I'm getting is

    UnityLoader.js:4 failed to asynchronously prepare wasm: LinkError: WebAssembly.instantiate(): table import 1 is smaller than initial 104523, got 104402
    LinkError: WebAssembly.instantiate(): table import 1 is smaller than initial 104523, got 104402


    I'm getting the same result building it on 2018.4.26f1 and 2018.4.27f1
    Can anybody help me solve that?
     
  2. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    944
    This suggests that the cached game content may have gone out of date somehow. Try clearing browser cache, or test on a browser that has not visited the page before?
     
  3. fgbg

    fgbg

    Joined:
    Dec 22, 2012
    Posts:
    53
    Is there a way to clear the cache from the unity/webgel side? This is a pain in the ass when deploying new test builds and trying them out.
     
  4. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    944
  5. LeventP

    LeventP

    Joined:
    Jul 17, 2020
    Posts:
    22
    I have the same error in some PC's. This is what is seen in the console. I've tried clearing the browser cache, but it doesn't help. Also tried from different browsers, those that have not visited the page, they have the same error.

    Other thing is, this only occurs on some PC's. It works without flaw on others.
    Please help!
     

    Attached Files:

  6. LeventP

    LeventP

    Joined:
    Jul 17, 2020
    Posts:
    22
    Here's an update: In the build settings, Code Optimization was set to "Size", then I changed to "Speed" and it was fixed. Unity v2020.2.5f1
     
  7. AlexeySeverin

    AlexeySeverin

    Joined:
    Oct 6, 2016
    Posts:
    12
    Hi. Where did you find this setting? I look all over Unity, including inside Build Settings and couldn't find anything that would say "Code Optimization" and then "Speed" or Size". Specifically installed and updated my project to Unity 2020.2.5f1 to try this.

    I am having this issue after trying to update a build on ftp server, only that I am having it everywhere, not only specific PCs. It goes something like this:

    WebGLBuild1.loader.js:1 wasm streaming compile failed: LinkError: WebAssembly.instantiate(): table import 1 is smaller than initial


    Any help would be very appreciated, thank you.
     
  8. jsr2k1

    jsr2k1

    Joined:
    Aug 11, 2010
    Posts:
    115
    Unity 2020.3.18f1
    WebGL platform > Build Settings > under Development Build
     

    Attached Files:

  9. anarcheril

    anarcheril

    Joined:
    Jan 8, 2013
    Posts:
    23
    Having this issue in 2021.1.22f1, setting Code Optimization to Speed seemed to have fixed things for a few builds but now shows whether Speed or Size is selected.
     
  10. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    100
    We get the error
    Uncaught RuntimeError: null function or function signature mismatch
    on 2021.3.5f1, and the issue is resolved when we set Code Optimization to Size.
    We don't see it in development builds, and we weren't seeing this on earlier versions.
    We'd really like this to be fixed, since it increases our build size by over 1mb, which is really nasty on web.
     
  11. UnityDevGo

    UnityDevGo

    Joined:
    Sep 15, 2022
    Posts:
    1
    Same issue dude,did you resolve this problem?:(