devtools icon indicating copy to clipboard operation
devtools copied to clipboard

[BUG] Dev tools fails to inspect component containing objects with "_isVue", throws errors and locks up devtools

Open douglasg14b opened this issue 2 years ago • 4 comments

Version

6.1.4

Browser and OS info

Chrome 99.0.4844.74

Steps to reproduce

  1. Create a Vue 2 component
  2. Create a class that includes a public _isVue = true;
  3. Instantiate this class in your component assigning it to a data field
  4. Go to the inspector, and click on your component in the component tree
  5. Observe infinite loading
  6. Observe console errors

What is expected?

That the component is inspected.

What is actually happening?

The inspector will infinitely load for that component, and the following errors show up in the console:

backend.js:7028 [Bridge] Error in listener for event b:component:selected-data with args: ['app-1:308'] wrappedListener @ backend.js:7028 await in wrappedListener (async) emit @ backend.js:10542 _emit @ backend.js:7098 (anonymous) @ backend.js:7011 (anonymous) @ backend.js:7011 listener @ backend.js:14172 postMessage (async) n @ proxy.js:1

backend.js:7029 TypeError: Cannot read properties of undefined (reading 'props') at processProps (backend.js:3982:35) at getInstanceState (backend.js:3925:10) at Object.getCustomInstanceDetails (backend.js:3933:17) at getCustomInstanceDetails (backend.js:6908:36) at backend.js:8356:82 at EncodeCache.cache (backend.js:8252:22) at Object.replacer (backend.js:8356:26) at encode (backend.js:8006:38) at encode (backend.js:8017:19) at encode (backend.js:8007:21)

image


This is a workaround prevent Vue making an object contained in a component reactive when it doesn't need to be, or when such reactivity causes crippling performance concerns, such as with Babylon.js. It works as expected.

This was not a problem before the dev tools update.

douglasg14b avatar Apr 03 '22 18:04 douglasg14b

I'm seeing the same thing. Was there ever a workaround or solution for this issue?

tehnorm avatar Aug 07 '22 19:08 tehnorm

我在运行一个使用了vue的简单的html文件时尝试使用了devtool并产生了同样的问题,而并非是包含了_isVue的组件,所以是完全没有解决方法是吗

Lyon1011 avatar Apr 28 '23 05:04 Lyon1011

Yeah, still an issue, when components like this are encountered the dev tools just break & lock up now 😬

douglasg14b avatar May 01 '23 00:05 douglasg14b

The same happenes with dynamic <component> in Nuxt.js. Is there any solution?

Zorii4 avatar Jul 03 '23 08:07 Zorii4