Search Unity

  1. Dismiss Notice
  2. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  3. Dismiss Notice

"RangeError: Maximum call stack size exceeded" after Unity has loaded in WebGL.

Discussion in 'WebGL' started by ViLLE-Team, Jun 12, 2015.

  1. ViLLE-Team

    ViLLE-Team

    Joined:
    Jun 12, 2015
    Posts:
    4
    Hi,

    I'm currently trying to solve above problem in our educational game project and I have come to a dead end with searching solutions all around internet.

    Our team is trying to integrate Unity game in to our own system built and coded with Vaadin, Java and Javascript. The thing is that our game needs to take parameters as "setups" from our system and use them in the game and when game is done, send something back with callback function. This all works perfectly in the game and via the index file created during conversion to WebGL platform game, I can send parameters to the game and it works with those "setups".However I have managed to encounter the above error when trying to integrate the game int to our system.

    First I tried to do it with <iframe> by putting the tags in to our systems running init.js file which executes function creating the iframe in the html. In the iframe, i just open the Unity generated index file and it shows the game inside the iframe without problems. (in this point, I have not change anything in the files given from Unity) So this solution works well. (code and picture link below)
    Code (JavaScript):
    1. $(this.getElement()).append('<iframe src="VAADIN/themes/vexer-catch_the_numbers/index.html" height="768" width="1024" frameborder="0"></iframe>');
    http://puu.sh/ilYzy/ac680429e2.jpg

    Now the first part of the problem I encountered was that sending parameters through iframe is the worst scenario you could ever imagine. That is 'cos the only way to do it is via the url, so we tried to find a way around this "last solution". We found out that it's possible (and even advisable) to do so by just getting all the code from the index file to the init.js file where I first had the iframe. As we did so, the code looked like this.
    Code (JavaScript):
    1.  
    2. var $thisElement = $(this.getElement());
    3. (function(){
    4.         $thisElement.append('<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" height="768px" width="1024px"></canvas>');
    5.         function OnUnityReady(){
    6.             var difficultyMode = "false";
    7.             var allowNumCollect = "true";
    8.             var sTime = 60;
    9.             var scoreTime = 3;
    10.             var scoreAmount = 5;
    11.             var dropRange = 6.0;
    12.  
    13.             var timeLeft = "TIME LEFT:";
    14.             var score = "SCORE:";
    15.             var gameOver = "GAME OVER";
    16.             var collection = "COLLECTED NUMBERS:";
    17.             var answersToCollect = "ANSWERS TO COLLECT:";
    18.             var translations = timeLeft + "/" + score + "/" + gameOver + "/" + collection + "/" + answersToCollect;
    19.  
    20.             var startGravity = 0.2;
    21.             var firstNumber = 1;
    22.             var secondNumber = 10;
    23.             var expOperator = "+";
    24.             var numToCollect = 2;
    25.             var difficultyTime = 60.0;
    26.             var stoppedForTime = 5.0;
    27.  
    28.             SendMessage("Setup", "SetDifficulty", difficultyMode);
    29.             SendMessage("Setup", "SetAllowNumCollect", allowNumCollect);
    30.             SendMessage("Setup", "SetStartTime", sTime);
    31.             SendMessage("Setup", "SetScoreTime", scoreTime);
    32.             SendMessage("Setup", "SetScoreAmount", scoreAmount);
    33.             SendMessage("Setup", "SetDropRange", dropRange);
    34.             SendMessage("Setup", "SetLanguage", translations);
    35.             SendMessage("Setup", "SetStartGravity", startGravity);
    36.             SendMessage("Setup", "SetFirstNumber", firstNumber);
    37.             SendMessage("Setup", "SetSecondNumber", secondNumber);
    38.             SendMessage("Setup", "SetExpOperator", expOperator);
    39.             SendMessage("Setup", "SetNumToCollect", numToCollect);
    40.             SendMessage("Setup", "SetDifficultyTime", difficultyTime);
    41.             SendMessage("Setup", "SetStoppedForTime", stoppedForTime);
    42.         }
    43.         function EndGame(){
    44.             gameClosed = true;
    45.             console.log("Is game closing: " + gameClosed);
    46.             //window.document.close();
    47.         }
    48.  
    49.         function Callback(score){
    50.             console.log("Game won with score: ", score);
    51.         }
    52.         // connect to canvas
    53.         var Module = {
    54.                 TOTAL_MEMORY: 268435456,
    55.                 filePackagePrefixURL: "/xxx/xxx/xxx/Release/",
    56.                 memoryInitializerPrefixURL: "/xxx/xxx/xxx/Release/",
    57.                 preRun: [],
    58.                 postRun: [],
    59.                 print: (function() {
    60.                     return function(text) {
    61.                         console.log (text);
    62.                     };
    63.                 })(),
    64.                 printErr: function(text) {
    65.                     console.error (text);
    66.                 },
    67.                 canvas: document.getElementById('canvas'),
    68.                 progress: null,
    69.                 setStatus: function(text) {
    70.                     if (this.progress == null)
    71.                     {
    72.                         if (typeof UnityProgress != 'function'){
    73.                             return;
    74.                         }
    75.                         this.progress = new UnityProgress (canvas);
    76.                         console.log("11");
    77.                     }
    78.                     if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
    79.                     if (text === Module.setStatus.text) return;
    80.                     this.progress.SetMessage (text);
    81.                     var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
    82.                     if (m){
    83.                         this.progress.SetProgress (parseInt(m[2])/parseInt(m[4]));
    84.                     }
    85.                     if (text === ""){
    86.                         this.progress.Clear()
    87.                     }
    88.                 },
    89.                 totalDependencies: 0,
    90.                 monitorRunDependencies: function(left) {
    91.                     this.totalDependencies = Math.max(this.totalDependencies, left);
    92.                     Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
    93.                 }
    94.         };
    95.         Module.setStatus('Downloading (0.0/1)');
    96.         var script = document.createElement('script');
    97.         script.type = 'text/javascript';
    98.         script.src = 'xxx/xxx/xxx/UnityConfig.js';
    99.         $thisElement.append(script);
    100.         console.log("20" + script);
    101.         script = document.createElement('script');
    102.         script.type = 'text/javascript';
    103.         script.src = 'xxx/xxx/xxx/fileloader.js';
    104.         $thisElement.append(script);
    105.         if (!(!Math.fround)) {
    106.             var script = document.createElement('script');
    107.             script.src = "/xxx/xxx/xxx/CatchTheNumber.js";
    108.             document.body.appendChild(script);
    109.         } else {
    110.             var codeXHR = new XMLHttpRequest();
    111.             codeXHR.open('GET', '/xxx/xxx/xxx/CatchTheNumber.js', true);
    112.             codeXHR.onload = function() {
    113.                 var code = codeXHR.responseText;
    114.                 if (!Math.fround) {
    115.                     try {
    116.                         console.log('optimizing out Math.fround calls');
    117.                         var m = /var ([^=]+)=global\.Math\.fround;/.exec(code);
    118.                         var minified = m[1];
    119.                         if (!minified) throw 'fail';
    120.                         var startAsm = code.indexOf('// EMSCRIPTEN_START_FUNCS');
    121.                         var endAsm = code.indexOf('// EMSCRIPTEN_END_FUNCS');
    122.                         var asm = code.substring(startAsm, endAsm);
    123.                         do {
    124.                             var moar = false; // we need to re-do, as x(x( will not be fixed
    125.                             asm = asm.replace(new RegExp('[^a-zA-Z0-9\\$\\_]' + minified + '\\(', 'g'), function(s) { moar = true; return s[0] + '(' });
    126.                         } while (moar);
    127.                         code = code.substring(0, startAsm) + asm + code.substring(endAsm);
    128.                         code = code.replace("'use asm'", "'almost asm'");
    129.                     } catch(e) { console.log('failed to optimize out Math.fround calls ' + e) }
    130.                 }
    131.                 var blob = new Blob([code], { type: 'text/javascript' });
    132.                 codeXHR = null;
    133.                 var src = URL.createObjectURL(blob);
    134.                 var script = document.createElement('script');
    135.                 script.src = URL.createObjectURL(blob);
    136.                 script.onload = function() {
    137.                     URL.revokeObjectURL(script.src);
    138.                 };
    139.                 document.body.appendChild(script);
    140.             };
    141.             codeXHR.send(null);
    142.         }
    143.     })();
    After doing this the real problem (the part 2) started. So if I'm correct, when this init.js file is executed by our system, it creates the canvas (that index already had) and then executes the other scripts as the index did too and in the same order. I tried to debug the code through with console.log() and it went through the whole code normally. The problem itself occurred after the so called "initialization of the game". So my final question is where did I go wrong, when the game (tested both, chrome and Firefox) throws me ""RangeError: Maximum call stack size exceeded" (though Firefox gives only ”Too much recursion” error) PLEASE help me with this, I peg you (on my knees, of course). I also attached some files to be clearer with all this.
     

    Attached Files:

    Last edited: Jun 12, 2015
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,647
    This can currently happen in WebGL when it tries to find a function which is getting stripped (and then some code endlessly recurses trying to find that function). We are fixing this to do better error reporting, until then, try putting in some Debug prints in the code around where the issue happens, to find out what code it is calling, so you might see which function is getting stripped.
     
  3. ViLLE-Team

    ViLLE-Team

    Joined:
    Jun 12, 2015
    Posts:
    4
    Okey, I tried to debug through the code from the init.js file and put some console.debugs through out the initialization function. It goes through it without problems but the RangeError comes after the game has gone through the initialization. That's why I was so confused that where the error could come from. But should I still try to put some debugs in the game itself? I also took some pictures from the PlayerSettings of the game. The point is to get as small game package as possible so if you know some tricks to that too, let me know.
     
    Last edited: Jun 15, 2015
  4. notprathap

    notprathap

    Joined:
    Jan 18, 2013
    Posts:
    9
    I ran into the same issue as well. Jonas, what do you mean by "stripped"?
     
  5. ViLLE-Team

    ViLLE-Team

    Joined:
    Jun 12, 2015
    Posts:
    4
    One step closer to the error once again. I tried the console trick and took it further on. I put console.logs all over the UnityConfig.js and fileloader.js files and was able to locate one kind of source where it comes from. Here is the fileloader.js
    Code (JavaScript):
    1. function runWithFS() {
    2.                 console.log("Fileloader 24");
    3.                 function assert(check, msg) {
    4.                     console.log("Fileloader 25");
    5.                     if (!check) throw msg + new Error().stack;
    6.                 }
    7.                 Module['FS_createPath']('/', 'Resources', true, true);
    8.                 console.log("Fileloader 26");
    9.                 function DataRequest(start, end, crunched, audio) {
    10.                     this.start = start;
    11.                     this.end = end;
    12.                     this.crunched = crunched;
    13.                     this.audio = audio;
    14.                     console.log("Fileloader 27");
    15.                 }
    16.                 DataRequest.prototype = {
    17.                         requests: {},
    18.                         open: function(mode, name) {
    19.                             console.log("Fileloader 28");
    20.                             this.name = name;
    21.                             this.requests[name] = this;
    22.                             Module['addRunDependency']('fp ' + this.name);
    23.                         },
    24.                         send: function() {},
    25.                         onload: function() {
    26.                             console.log("Fileloader 29");
    27.                             var byteArray = this.byteArray.subarray(this.start, this.end);
    28.  
    29.                             this.finish(byteArray);
    30.  
    31.                         },
    32.                         finish: function(byteArray) {
    33.                             console.log("Fileloader 30");
    34.                             var that = this;
    35.                             Module['FS_createPreloadedFile'](this.name, null, byteArray, true, true, function() {
    36.                                 Module['removeRunDependency']('fp ' + that.name);
    37.                             }, function() {
    38.                                 if (that.audio) {
    39.                                     console.log("Fileloader 31");
    40.                                     Module['removeRunDependency']('fp ' + that.name); // workaround for chromium bug 124926 (still no audio with this, but at least we don't hang)
    41.                                 } else {
    42.                                     console.log("Fileloader 32");
    43.                                     Module.printErr('Preloading file ' + that.name + ' failed');
    44.                                 }
    45.                             }, false, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change
    46.                             this.requests[this.name] = null;
    47.                         },
    48.                 };
    49.                 console.log("Fileloader 33");
    50.                 new DataRequest(0, 31356, 0, 0).open('GET', '/mainData');
    51.                 new DataRequest(31356, 31588, 0, 0).open('GET', '/methods_pointedto_by_uievents.xml');
    52.                 new DataRequest(31588, 4403916, 0, 0).open('GET', '/sharedassets0.assets');
    53.                 new DataRequest(4403916, 4410113, 0, 0).open('GET', '/sharedassets0.resource');
    54.                 new DataRequest(4410113, 5985149, 0, 0).open('GET', '/Resources/unity_default_resources');
    55.                 new DataRequest(5985149, 6485625, 0, 0).open('GET', '/Resources/unity_builtin_extra');
    56.                 console.log("Fileloader 34");
    57.                 function processPackageData(arrayBuffer) {
    58.                     console.log("Fileloader 35");
    59.                     Module.finishedDataFileDownloads++;
    60.                     assert(arrayBuffer, 'Loading data file failed.');
    61.                     var byteArray = new Uint8Array(arrayBuffer);
    62.                     var curr;
    63.                     console.log("Fileloader 36");
    64.                     // Reuse the bytearray from the XHR as the source for file reads.
    65.                     DataRequest.prototype.byteArray = byteArray;
    66.                     DataRequest.prototype.requests["/mainData"].onload();
    67.                     DataRequest.prototype.requests["/methods_pointedto_by_uievents.xml"].onload();
    68.                     DataRequest.prototype.requests["/sharedassets0.assets"].onload();
    69.                     DataRequest.prototype.requests["/sharedassets0.resource"].onload();
    70.                     DataRequest.prototype.requests["/Resources/unity_default_resources"].onload();
    71.                     DataRequest.prototype.requests["/Resources/unity_builtin_extra"].onload();
    72.                     Module['removeRunDependency']('datafile_CatchTheNumber.data');
    73.                     console.log("Fileloader 37");
    74.                 };
    75.                 Module['addRunDependency']('datafile_CatchTheNumber.data');
    76.                 console.log("Fileloader 38");
    77.                 if (!Module.preloadResults) Module.preloadResults = {};
    78.                 console.log("Fileloader 39");
    79.                 Module.preloadResults[PACKAGE_NAME] = {fromCache: false};
    80.                 if (fetched) {
    81.                     console.log("Fileloader 40");
    82.                     processPackageData(fetched);
    83.                     fetched = null;
    84.                 } else {
    85.                     console.log("Fileloader 41");
    86.                     fetchedCallback = processPackageData;
    87.                 }
    88.                 console.log("Fileloader 42");
    89.             }
    90.             if (Module['calledRun']) {
    91.                 console.log("Fileloader 43");
    92.                 runWithFS();
    93.             } else {
    94.                 console.log("Fileloader 44");
    95.                 if (!Module['preRun']) Module['preRun'] = [];
    96.                 Module["preRun"].push(runWithFS); // FS is not initialized yet, wait for it
    97.             }
    Now I get the error somewhere around here:
    (This is from my browsers console prints)
    Fileloader 24
    Fileloader 26
    Fileloader 33
    Fileloader 27
    Fileloader 28
    Fileloader 27
    Fileloader 28
    Fileloader 27
    Fileloader 28
    Fileloader 27
    Fileloader 28
    Fileloader 27
    Fileloader 28
    Fileloader 27
    Fileloader 28
    Fileloader 34
    Fileloader 38
    Fileloader 39
    Fileloader 40
    Fileloader 35
    Fileloader 25
    Fileloader 36
    Fileloader 29
    Fileloader 30
    Fileloader 29
    Fileloader 30
    Fileloader 29
    Fileloader 30
    Fileloader 29
    Fileloader 30
    Fileloader 29
    Fileloader 30
    Fileloader 29
    Fileloader 30
    Fileloader 37
    Fileloader 42
    Invoking error handler due to
    Uncaught RangeError: Maximum call stack size exceeded

    Attached the console logs to different files, so it's clearer to see the differents
     

    Attached Files:

    Last edited: Jun 16, 2015
  6. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,647
    We strip code which is not used during the build. However, sometimes, we cannot determine that a method or type is being used - typically when something is trying to call them by reflection by name, and may end up incorrectly stripping that code. You can use a link.xml file as described here to work around that: http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html
     
  7. ViLLE-Team

    ViLLE-Team

    Joined:
    Jun 12, 2015
    Posts:
    4
    So how about the reading order of the files. According to those files I posted earlier, the iframe has different reading order than when I'm trying to execute all from one js file. Any suggestions to that?
     
  8. notprathap

    notprathap

    Joined:
    Jan 18, 2013
    Posts:
    9
    Oh right, thanks for the explanation. Just so everyone knows, in my case, the rangeerror was actually caused by a method that was throwing a null reference exception - once I fixed that, this error stopped appearing.
     
  9. maudlinmonkey

    maudlinmonkey

    Joined:
    Jun 14, 2014
    Posts:
    3
    Also happens when trying to use Unity Analytics on WebGL...

    And by use, I mean just having 'using UnityEngine.Analytics'
     
    Last edited: Jul 22, 2015
  10. dreg_master

    dreg_master

    Joined:
    Jan 4, 2016
    Posts:
    40
    Hi There,

    I know this is old thread, this is happening to me now, has happened in past but resolved itself, so I'm not sure to wait it out or try troubleshoot. I need some help. I've scoured the web for a few days now on google and stack overflow etc. My game stopped working on WebGL after the Unity update 2018.1.0f2 Personal. Now WebGL fails, but runs in editor and PC builds fine. I have played around allot with the player settings to no avail. bosssoftaware.net/GLTrump.html. There are no errors in my code(from what i can tell), worked before the update.

    Google Chrome gives error - Uncaught RangeError: Maximum call stack size exceeded.
    Firefox gives error - too much recursion

    My next step it to try debug chrome and firefox, but I am unsure and not sure if it is worth it, so if anyone know anything please inform me.
     
  11. dreg_master

    dreg_master

    Joined:
    Jan 4, 2016
    Posts:
    40
    SOLVED. For me it was to set in the WebGL Player settings API Compatibility level to .Net Standard 2.0
     
    tytbone likes this.
  12. IAmPatSilva

    IAmPatSilva

    Joined:
    Dec 30, 2015
    Posts:
    7
    Instead of Creating a new Thread, I felt that this one was very relevant to what I was going through in Unity 2018.1.0f.

    My Problem: I received the Range Error with a project that was a part of a series of simulations, they all are their own builds and runs similarly simulating different devices. So far everyone of them was working except for one particular project. I kept running into this error on Google Chrome. now I did not test it on any other browsers.

    I tried to change the API Compatibility Level to .NET 2.0, not the subset. However I still ran into this error

    Solution: After more research I found this thread https://answers.unity.com/questions/1181369/uncaught-rangeerror-maximum-call-stack-size-exceed.html

    The first response declared that Clearing Chrome's Data fixed the problem. This worked for me, however I do not want my users to have to clear chrome's data if they run into this error.

    My Question: Is there a way where I can avoid this error all together?
     
    TheVirtualMunk likes this.
  13. jvalenciag

    jvalenciag

    Joined:
    Dec 2, 2018
    Posts:
    2
    For me neither cleaning Chrome's data nor changing the API compatibility level, didn't worked for me, anyone knows if there is a bug report created?
     
  14. Raybosama

    Raybosama

    Joined:
    Nov 7, 2018
    Posts:
    1
    I had similar problems with the Chrome browser, even with API Compatibility Level set to .NET 2.0. To fix it I went to the Resolution and Presentation settings of Player Settings and selected Minimal WebGL Template. Then rebuilt and redeployed.

    Minimal.png
     
    Last edited: Mar 15, 2019
  15. tytbone

    tytbone

    Joined:
    Jul 16, 2013
    Posts:
    18
    Sorry for the bump but I think (fingers crossed) this solved the same "rangeerror maximum call stack" error I had (changing Scripting Runtime Version to 4.0 first, then Net Standard 2 became available as an Api Compatibility Level option), so I really appreciate you posting this as I don't know if I would have figured that out myself. (I combined it with Raybosama's suggestion of "Minimal WebGL Template" too just to be safe since I'm not close to being a pro at developing and debugging. :p) I'm still on 2018.2.11f1 so maybe that caused some issue(s).
     
  16. The_Devil

    The_Devil

    Joined:
    Jun 6, 2015
    Posts:
    36
    I have a simple scene with two 3D models (https://assetstore.unity.com/packages/3d/environments/fantasy/baker-s-house-26443) and two dynamic lights. This scene loads fine on both desktop , android and iphones (total file size was under 5 MB). I added a single Text Mesh Pro label to the scene was updating it through code (sort of like a debug log but visible on screen) and this worked correctly on android and desktop. But when I try to run on safari or chrome on an iPhone 7 running ios version 13.1.1 it does not load. It shows the warning message (which it showed earlier too) and on pressing ok it proceeds to load the scene. It stops at about 90% with the following stack trace :


    Code (CSharp):
    1. Warning: Unsupported graphics API WebGL 2.0
    2. [UnityCache] 'http://192.168.0.179/webgl/Build/Web.wasm.code.unityweb' successfully revalidated and served from the indexedDB cache
    3. [UnityCache] 'http://192.168.0.179/webgl/Build/Web.wasm.framework.unityweb' successfully revalidated and served from the indexedDB cache
    4. [UnityCache] 'http://192.168.0.179/webgl/Build/Web.data.unityweb' successfully revalidated and served from the indexedDB cache
    5. failed to asynchronously prepare wasm: Error: Out of executable memory in function at index 29257
    6. Error: Out of executable memory in function at index 29257
    7. Error: Out of executable memory in function at index 29257
    8. still waiting on run dependencies:
    9. dependency: wasm-instantiate
    10. (end of list)
    11. still waiting on run dependencies:
    12. dependency: wasm-instantiate
    13. (end of list)
    14. still waiting on run dependencies:
    15. dependency: wasm-instantiate
    16. (end of list)
    17. still waiting on run dependencies:
    18. dependency: wasm-instantiate
    19. (end of list)
    20. still waiting on run dependencies:
    21. dependency: wasm-instantiate
    22. (end of list)
    23. still waiting on run dependencies:
    24. dependency: wasm-instantiate
    25. (end of list)
    26. still waiting on run dependencies:
    27. dependency: wasm-instantiate
    28. (end of list)
    29. still waiting on run dependencies:
    30. dependency: wasm-instantiate
    31. (end of list)
    32. still waiting on run dependencies:
    33. dependency: wasm-instantiate
    34. (end of list)
    35. still waiting on run dependencies:
    36. dependency: wasm-instantiate
    37. (end of list)
    38. still waiting on run dependencies:
    39. dependency: wasm-instantiate
    40. (end of list)
    41.  
    It then shows a popup with the message "RangeError: Maximum call stack size exceeded".

    I have tried restarting the phone, clearing the cache, the scripting run-time version is set to .Net 4,x Equivalent, set the display to minimal as mentioned above, increased memory to 512 from 256 under Publishing settings. I have no idea what else to try. I have new to web development and hence have to idea on how to proceed ahead. Any help would be appreciated.
     
  17. iLyxa3D

    iLyxa3D

    Joined:
    Sep 25, 2013
    Posts:
    31
    Try to clear browser cache (Ctrl+F5). Sometimes it helps with this bugs.
     
    jimmack, Dirrogate and GigaRenzo like this.
  18. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    827
    This is a painful issue we are very well aware of with older versions of Safari. These are reported as

    https://bugs.webkit.org/show_bug.cgi?id=181723
    https://bugs.webkit.org/show_bug.cgi?id=200686
    https://bugs.webkit.org/show_bug.cgi?id=200807
    https://bugs.webkit.org/show_bug.cgi?id=206284

    The problem should be fixes in newer versions of Safari. If the issue still reproduces in latest Safari browsers, please let us know.
     
  19. jimmack

    jimmack

    Joined:
    May 2, 2016
    Posts:
    16
    Thank you. This was all it took for me. Now. If only the Unity team can get gzip compression working properly with the Linux version of 2020.2 :)
     
  20. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    827
    I was not aware of an issue on this front (granted, I don't have a Linux development system available atm - another engineer is looking at Linux WebGL support for Unity 2021.2 release). Is there a specific error you get? I could route that by him if so.
     
  21. maximiliananzinger

    maximiliananzinger

    Joined:
    Mar 4, 2020
    Posts:
    2
    Same error here: "RangeError: Maximum call stack size exceeded"

    I tried a new Unity scene without any modificiation.
    Unity Version is 2020.03.0f1 and I set the compatibility to .Net Standard 2.0, as well as chose the minimal template.
    This did not solve the issue for me.
    Clearing Browser Cache also didn't help.

    Chrome error is the one already mentioned above: "RangeError: Maximum call stack size exceeded"
    Firefox error is: " RangeError: too many arguments provided for a function call" -> loader.js with statement:
    "apply(null, e.subarry(r,r+1));r+=i ..."
     
  22. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    492
    Same problem with Unity 2021.1.7f1 (64-bit)

    gzip ==> fail to load with "RangeError: Maximum call stack size exceeded"
    Brotli ==> working
     
  23. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    827
    These are errors that we have not seen reported before. When you get this issue, was the project built with the "Compression Fallback" option enabled or disabled?

    My suspect is that the error message would be coming from the software-based compression fallback code, that would be good to confirm.

    Do you have a failing build somewhere you could zip up?
     
unityunity