Errors / JavaScript errors
Uncaught RangeError: Maximum call stack size exceeded
A script got stuck calling itself in a loop until the browser stopped it.
That feature freezes or fails; sometimes the tab hangs for a moment first.
Why it happens
- A recursive function with no exit, or an exit that is never reached.
- Two things triggering each other: a setter that sets itself, an event handler that fires the same event, two watchers updating each other.
- The same script or polyfill loaded twice, wrapping a function around its own wrapper.
How to fix it
- The stack in the console repeats the same few frames: those are the loop.
- Add the missing exit condition, or break the cycle between the two things calling each other.
- Look for a library included twice.
- In DevTools' Sources panel, turn on Pause on exceptions and reproduce: the debugger stops inside the loop with the whole call stack visible, and the frames that repeat are the cycle. In React or Vue, a state update inside render or a watcher that writes what it watches is the usual shape.
Whose problem it is
Usually the site's own code or settings.
Does your site have it?
Free, no account. We open your page and four more in a clean Chrome and list every error like this one, with the page and the click that caused it. How the free page check works.