-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Maximum call stack size exceeded in Vue warn #8074
Comments
Here's a patch that solves the issue for me: diff --git a/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js b/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js
index 8442995..ca1c078 100644
--- a/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js
+++ b/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js
@@ -12,6 +12,7 @@ function pushWarningContext(vnode) {
function popWarningContext() {
stack.pop();
}
+var lastWarnArgsString;
function warn(msg, ...args) {
// avoid props formatting or warn handler tracking deps that might be mutated
// during patch, leading to infinite recursion.
@@ -37,7 +38,11 @@ function warn(msg, ...args) {
!false) {
warnArgs.push(`\n`, ...formatTrace(trace));
}
- console.warn(...warnArgs);
+ const warnArgsString = warnArgs.map(x => x.toString()).join(';');
+ lastWarnArgsString = warnArgsString;
+ if (lastWarnArgsString !== warnArgsString) {
+ console.warn(...warnArgs);
+ }
}
reactivity.resetTracking();
} Here's output before:
Here's output after:
As you can see, previously it was saying "Maximum call stack size exceeded" and now it's saying "ResizeObserver is not defined" which is the actual error and makes much more sense. |
could you provide a runnable minimal reproduction? |
I'll try to come up with something, likely this weekend |
Here's the repro: https://github.com/Maxim-Mazurok/vue-8074-repro Latest Vue is used. Updating from vuetify |
@edison1105 did the repro help? |
@Maxim-Mazurok Thanks, It can reproduce the problem. |
Bump. We also stumbled on this issue which crashes our app. We are not using Vuetify. |
Vue version
3.2.47
Link to minimal reproduction
https://github.com/Maxim-Mazurok/vue-8074-repro
Steps to reproduce
Basically I'm trying to test Vuetify VSelect component in Vitest and I don't have window.ResizeObserver in jsdom.
This results in Error from watcher:
[Vue warn]: Unhandled error during execution of watcher callback
After that, in
node_modules/@vue/runtime-core/dist/runtime-core.cjs.js
is enters an infinite loop:in
function warn
it takestrace
which includesRef
/Proxy
, and when trying toconsole.warn()
it - it triggersAvoid app logic that relies on enumerating keys on a component instance
warning which then has the same trace, which triggersAvoid app logic that relies on enumerating keys on a component instance
which has the same trace, and so on, loop.What is expected?
No loop.
What is actually happening?
Loop :)
System Info
Any additional comments?
Sorry for a bit rushed report, hopefully it's enough detail, I'm trying to debug it now.
The text was updated successfully, but these errors were encountered: