Vue: Maximum call stack exceeded when using with custom components

Created on 10 Mar 2018  ·  9Comments  ·  Source: vuejs/vue

Version

2.5.14

Reproduction link

https://jsfiddle.net/50wL7mdz/175425/

Steps to reproduce

  1. Including vue(v.2.5.14) and element.io styles and library.
  2. Opening new form.
  3. Opening new form element.
  4. Using custom date picker element.

What is expected?

It is expected to render a custom UI component for date picking.

What is actually happening?

The element is not being render as the console is filled with errors.

RangeError: Maximum call stack size exceeded, vue.js:1745


The issue is related to the latest vue.js version as it is working as expected with all up to 2.5.13.

Most helpful comment

Confirming this issue when store in a strict mode (using nuxt)

All 9 comments

Duplicate of #7786

I still get this error, but I haven't got the time to put together a reproduction case right now. I know that it exists in 2.5.16 still and going back to 2.5.13 resolves the issue and the error looks like RangeError: Maximum call stack size exceeded at Function.[Symbol.hasInstance] (<anonymous>) at t (app.c84200b64a284b43c3fe.js:1) which t is the _traverse function and the error is in https://github.com/vuejs/vue/blob/84a9a9d61057f6f40a9ad2bee456b39ef0a8f001/src/core/observer/traverse.js#L19-L24

I also get this error, when document.querySelector() tries to bind DOM to a configuration element, that is set to store.config via a mutation. (The function is called from root element's mounted() ) ...

EDIT: happens only, when store is in strict mode.

Confirming this issue when store in a strict mode (using nuxt)

Confirming too with v2.5.15 and v2.5.17

I'm possibly seeing this as well. Can confirm that disabling strict mode in the vuex store seemed to fix the issue.

Yeah, strict mode does seem to fix the issue.

var selfObj= {};
selfObj.self = selfObj;
new Vue({
computed: { selftWatch: function get() { return selfObj; } } ,
watch: {
selftWatch: {
deep: true,
handler: function () { console.error('seccess run ')}
}
}
});
看了下 _traverse 方法,没有对 对象去重,应该记录所有对象的引用。

I was brought to this issue by searching for:
Error in render: "RangeError: Maximum call stack size exceeded

However, it didn't have anything to do with the naming of components. It's probably related to what @Gyanxie posted above.

My offender was the code snippet below:

watch: {
    '$vuetify.breakpoint': {
      handler: function(newBreakpoint) {},
      deep: true,
      immediate: true
    }
}

This might prove useful to the next person that runs into this cryptic error message

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bdedardel picture bdedardel  ·  3Comments

robertleeplummerjr picture robertleeplummerjr  ·  3Comments

paulpflug picture paulpflug  ·  3Comments

6pm picture 6pm  ·  3Comments

wufeng87 picture wufeng87  ·  3Comments