question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Out of stack space" error

See original GitHub issue

Intended outcome:

In our application, we are using Apollo Client, and are doing some manual queries (i.e. not attached to a component). I would expect that it works on IE11 like it works everywhere else.

Actual outcome:

On IE11, we get an “Out of stack space” error thrown in IE11. This only happens when we make Apollo Client queries. When we comment out our graphql queries, our application works fine on IE11.

The weird thing is this error only occurs when Google Maps is included. When we remove Google Maps, everything works great. … I know, right?!

How to reproduce the issue:

I have boiled it down to a small reproducible example. To reproduce:

git clone https://github.com/lehresman/apollo-client-ie11-example.git
cd apollo-client-ie11-example
yarn install
node server.js

Then visit http://localhost:3001 in IE11

Edit www/index.html and remove the Google Maps <script> tag and you’ll see everything works fine.

Version

  • apollo-client@2.2.5

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

8reactions
petetntcommented, Feb 21, 2018

We looked through the issue with @valstu and the issue is there seems to be rather complex (or at least sounds silly, but hear me out 😂):

The failing piece of code is

https://github.com/apollographql/apollo-client/blob/6eec674f206cda11cf667a89022354b1476f5503/packages/apollo-client/src/core/QueryManager.ts#L588-L596

which calls deepFreeze similar to substack/deep-freeze in apollo-utilities:

https://github.com/apollographql/apollo-client/blob/a32f31d79806a29cd2a9f6211d64c92997d5408a/packages/apollo-utilities/src/util/maybeDeepFreeze.ts#L3-L18

Okay, now the silly part: when Google updated Google Maps to version 3.30 I’d assume they updated their version of Closure Compiler too. The reason why everything fails is that Object.getOwnPropertyNames(o) suddenly has the Symbol polyfill keys in them:

image

(jscomp_symbol is the Symbol polyfill of Closure Compiler, right?)

… which ends up in endless loop on IE11 and eventually crashes the browser. I’d think the issue might be related to https://github.com/google/closure-compiler/issues/2448

Using different deepFreeze doesn’t help either, we tried deep-freeze-strict and js-flock first to check if some other deepFreeze implementation wouldn’t have the same problem but obviously enumerating the ownProperties rely on the same things.

(Downgrading to Google Maps v3.29 isn’t an option either anymore as they retired it, so there’s that too.).

I don’t know if there’s any other short term solution to not deepFreeze them, but that has its own downsides. On the other hand this should only occur on non-production version IE11, which only affect one if they are trying to debug Google Maps issues on IE11 (like we have done for like 5 working days now…).

Also: https://twitter.com/pete_tnt/status/940987922664312832

2reactions
hwillsoncommented, May 15, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Out of stack space - Visual Basic - Microsoft Learn
To correct this error · Check that procedures are not nested too deeply. · Make sure recursive procedures terminate properly. · If local...
Read more >
Out of stack space vba excel - Stack Overflow
"Out of stack" error are caused when you assign the variable with large number more than it can hold. for example, i and...
Read more >
How To Fix Runtime Error 28 – “Out Of Stack Space”
Step 1 – Re-Install Any Software Causing The Problem · Take a note of the application causing the “Out of Stack Space” runtime...
Read more >
How To Fix Runtime Error 28 - Solvusoft
Most Out of stack space problems stem from a missing or corrupt Out of stack space, virus infection, or invalid Windows registry entries...
Read more >
How to fix the Runtime Code 28 Out of stack space
Method 3 - Update your Virus protection program or download and install the latest Windows Update · Method 7 - IE related Runtime...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found