Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Out of stack space #18

Open
ibdf opened this issue Jul 14, 2020 · 4 comments
Open

Error: Out of stack space #18

ibdf opened this issue Jul 14, 2020 · 4 comments

Comments

@ibdf
Copy link

ibdf commented Jul 14, 2020

Hello,

I've been running Sentry to detect issues on our apps. I noticed this error comes up often:

Out of stack space
It's triggered by getCurrentScript
./node_modules/vue-browser-detect-plugin/dist/vue-browser-detect-plugin.umd.js in getCurrentScript at line 1044:5
49

This is how I've been using it:
import browserDetect from "vue-browser-detect-plugin";
Vue.use(browserDetect);

and then I make one call in the vue template: $browserDetect.isIE

It does not seem to be affecting the application, it just seems that getCurrentScript never stops running.

@cschweda
Copy link
Contributor

Thanks. I will take a look at this.

@cschweda
Copy link
Contributor

cschweda commented Sep 4, 2021

Not sure about this. Can you provide more detail?

@JeremyQtweb
Copy link

JeremyQtweb commented Dec 22, 2021

Hi @cschweda , @ibdf ,

We've had the same error on app startup when we perform $browserDetect.isIE for the past year or two in IE11.

Our app runs inside Windows applications that need to use IE11 still, and it hasn't been a real problem until in just the last few weeks - in production - the error is now triggering a error dialog to be raised that users need to click before they can proceed.

The error occurs when the getCurrentScript() function is called here;

image

The IE11 console displays this;

image

Before I could get the error to hit vue-browser-detect-plugin.js specifically (i.e. split out the scripts etc. in build) I was seeing a reference to this exception;

image

Is this just a missing polyfill - or a polyfill conflict perhaps?

@JeremyQtweb
Copy link

Update...

Found a polyfill solution for this issue soon after posting the question.

Solution confirmed on this Stack Overflow article;
https://stackoverflow.com/questions/4172180/recommended-method-to-locate-the-current-script/32739881

"Just in case someone working with Nuxt comes up to such message, just bundle a pollyfill from pollyfill.io with a document.currentScript & it will solve the problem. This answer has helped me to indentify the polyfill name. – StartedFromTheBottom - Aug 30 at 7:43"

Added via script section in head via Nuxt.config;
https://newbedev.com/how-to-add-a-polyfill-to-nuxt-2-0

Polyfill builder;
https://polyfill.io/v3/url-builder/

Polyfill URL generated;
https://polyfill.io/v3/polyfill.min.js?features=document.currentScript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants