Navigation Menu

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

RangeError: Maximum call stack size exceeded #2262

Closed
chenhongtu opened this issue Aug 29, 2019 · 8 comments
Closed

RangeError: Maximum call stack size exceeded #2262

chenhongtu opened this issue Aug 29, 2019 · 8 comments
Labels
duplicate This issue or pull request already exists ☔ has workaround this issue has a workaround

Comments

@chenhongtu
Copy link

chenhongtu commented Aug 29, 2019

Versions

  • vee-validate: 3.0.3
  • vue: 2.6.20
  • ant-design-vue: 1.3.16

Describe the bug
Error in v-on handler: "RangeError: Maximum call stack size exceeded"
crash

To reproduce
type some characters

Demo link
Codesandbox.

Desktop:

  • OS: Windows 10
  • Browser Chrome
  • Version 76
@logaretm
Copy link
Owner

I'm not sure what is the problem, there is a workaround though.

You could inline the element instead of using slot to pass it in ... Until I investigate more.

@logaretm logaretm added the ☔ has workaround this issue has a workaround label Aug 30, 2019
@chenhongtu
Copy link
Author

@logaretm
The number of listeners for the INPUT vue instance will continue to grow.
INPUT vue instance $listeners {change.value: Array(241), blur: Array(241)}

@logaretm
Copy link
Owner

logaretm commented Sep 2, 2019

This is duplicate of #2185

I will try to address this issue once I pinpoint the problem.

@logaretm logaretm added the duplicate This issue or pull request already exists label Sep 2, 2019
@gryphon
Copy link

gryphon commented Sep 7, 2019

Having the same issue for me.
Making own component with ValidationProvider and slot for input could be much more useful then other ways of refactoring validation provider but this causes call stack errors.

@antoniogiroz
Copy link

Same error for me. The error appears when the field loses the focus.

CodeSandbox: https://codesandbox.io/s/veevalidate-custom-input-6gb4c

@logaretm
Copy link
Owner

Well finally I was able to pinpoint the issue, a couple of Vue internals I wasn't aware of were causing an infinite loop to happen under that condition for some reason.

@vhoyer
Copy link

vhoyer commented Sep 18, 2019

So you changed the order of the checks and that did the job, or it was specifically the .fns? what even is this .fns?

@logaretm
Copy link
Owner

logaretm commented Sep 18, 2019

@vhoyer The order of checks wasn't really the fix here.

Some parts of the Vue VNode are undocumented. Whenever you have a vnode that has a v-model on it, the invoker object shows up with the listeners inside its fns array. The buggy code treated the invoker function like functions on vnode.data.on.

This caused the invoker to be circular, as it was always going to reference itself due to the merging strategy I used. I added another one specifically for the invoker function which is to sneak in my listeners instead, that did the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists ☔ has workaround this issue has a workaround
Projects
None yet
Development

No branches or pull requests

5 participants