You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core/vue): Detect and skip normalizing Vue VNode objects with high normalizeDepth (#18206)
Fixes#18203
### Problem
When using `normalizeDepth: 10` with `captureConsoleIntegration`
enabled, Vue VNodes in console arguments would trigger recursive warning
spam. Accessing VNode properties during normalization would trigger
Vue's reactive getters, which emit console warnings. These warnings
would then be captured and normalized again, creating a recursive loop
that could generate hundreds of warnings.
Note that this only happens in `dev` mode
### Solution
Changed `isVueViewModel()` to detect Vue 3 VNodes (`__v_isVNode: true`)
in addition to Vue 2/3 ViewModels. VNodes are now identified early in
the normalization process and stringified as `[VueVNode]` before their
properties are accessed, preventing the recursive warning loop.
Some of the properties on the `VNode` can also be reactive, so it can
incorrectly add those to a watchEffect or a render function reactive
dependencies when accessed by the normalizer.
### Changes
- **`packages/core/src/utils/is.ts`**: Added `__v_isVNode` check to
`isVueViewModel()`.
- **`packages/core/src/utils/normalize.ts`**: Distinguish VNodes from
ViewModels in output (`[VueVNode]` vs `[VueViewModel]`).
- **Tests**: Added comprehensive unit tests for Vue object detection and
integration test that verifies no property access occurs during VNode
normalization.
---
I couldn't reproduce this exactly in a test with a real vue component,
but verified it fixes the reproduction example.
The before and after of the captured logs:
Before:
<img width="1106" height="1137" alt="CleanShot 2025-11-14 at 15 46 30"
src="https://github.com/user-attachments/assets/435dbb04-ba3c-430b-8c39-d886f92072e8"
/>
After:
<img width="908" height="768" alt="CleanShot 2025-11-14 at 15 45 15"
src="https://github.com/user-attachments/assets/e7d8cca2-a0e1-48bb-9f95-3a39d2164d21"
/>
As a Vue developer I don't think the loss of information here would help
debug anything.
0 commit comments