- Home /
Uncaught RangeError : Maximum Call Stack Size Exceeded after game loaded (hosted in azure)
So, i decided to update my game and upload it to azure server it usually works smoothly but now this error appears which i've never been encountered before...
i would like to give another clue for this problem if i could, but since i've never encountered this problem before and google doesn't help much i don't know what to do now
Answer by Chanyutx10 · Apr 10, 2018 at 12:05 PM
I have encountered the same problem. Fortunately, I can solve it by clear Google Chrome caches. Then I can't reproduce this issue again.
Thanks, that helped. Do you know what was causing this behaviour?
Answer by incorrect · May 04, 2016 at 07:36 PM
Have you seen this topic on forum? http://forum.unity3d.com/threads/rangeerror-maximum-call-stack-size-exceeded-after-unity-has-loaded-in-webgl.332956/
Possibly it's a bug in Unity's WebGL implementation.
yeah i've read those, but that still doesn't solve the problem because them game was running just fine a few moments ago
Answer by Chimooo · Aug 29, 2017 at 12:53 AM
Did you ever get to solve this problem? I am encountering the same where my build works locally on both chrome and firefox and when I upload it to the server it only works on firefox but chrome gives me that error.
Answer by jefryarch · Apr 14, 2020 at 02:27 PM
This error is almost always means you have a problem with recursion in JavaScript code, as there isn't any other way in JavaScript to consume lots of stack. Sometimes calling a recursive function over and over again, causes the browser to send you Maximum call stack size exceeded error message as the memory that can be allocated for your use is not unlimited. It's possible to cause infinite recursion in a fully promisified code, too. That can happen if the promises in a chain don't actually perform any asynchronous execution , in which case control never really returns to the event loop, even though the code otherwise appears to be asynchronous. That's when it's useful to wrap your recursive function call into a -
setTimeout
setImmediate or
process.nextTick
Also, you can localize the issue by setting a breakpoint on RangeError type of exception , and then adjust the code appropriately. Moreover, you can managed to find the point that was causing the error by check the error details in the Chrome dev toolbar console , this will give you the functions in the call stack, and guide you towards the recursion that's causing the error.