facebook / react

The library for web and native user interfaces.
https://react.dev
MIT License
228.71k stars 46.81k forks source link

[DevTools Bug] Cannot add node "1590" because a node with that id is already in the Store. #27728

Open Tungquantedge opened 11 months ago

Tungquantedge commented 11 months ago

Website or app

https://editor.wix.com/html/editor/web/renderer/edit/1e14587f-a72d-4b5f-866d-f00b1ede1959?metaSiteId=e0eb6e2b-eb02-4e61-8c27-b28c38ce72f9

Repro steps

Just open web and error show

How often does this bug happen?

Every time

DevTools package (automated)

react-devtools-extensions

DevTools version (automated)

4.28.5-ef8a840bd

Error message (automated)

Cannot add node "1590" because a node with that id is already in the Store.

Error call stack (automated)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:1:1125187
    at A.emit (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:1:1095954)
    at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:1:1097642
    at bridgeListener (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:1:1495532)

Error component stack (automated)

No response

GitHub query string (automated)

https://api.github.com/search/issues?q=Cannot add node  because a node with that id is already in the Store. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react
hoxyq commented 11 months ago

Thanks for reporting this. Is there a minimal reproducible example, by any chance? Maybe you can put it into some sandbox, so I can try to debug it?

angussbj commented 11 months ago

I have the same problem, and sorry I haven't got a minimal reproducible example. I have however noticed that if you dismiss the error, everything works fine, except another similar error comes up every few seconds and covers the entire screen and you have to dismiss it again to see what you were looking at.

Is there a setting or configuration that I could use to auto-dismiss errors, or stop them covering the whole screen?

TroyDL commented 11 months ago

Seeing the same thing. The node value changes with every new one that pops up and they pop up frequently enough to make it unusable, despite seeing profiler results underneath them.

sirajalam049 commented 11 months ago

Same issue

brandones commented 11 months ago

Same issue. Occurring in a very complex micro-frontend app. Hope someone with a simpler set-up gets this so a repro is possible.

EsserMishelle commented 10 months ago

I defaulted to Chrome and the bug is solved.

Ha-limLee commented 9 months ago

I defaulted to Chrome and the bug is solved.

It solved the problem. Thanks!

vegerot commented 9 months ago

idk what information I should give

image

note: I'm developing a new feature for React DevTools so it might be a bug in my fork

katiearriagam commented 8 months ago

@hoxyq - I'm still seeing this on my dev tools when running on Edge (Chromium-based). Are there any updates?

KaiVandivier commented 8 months ago

For me, this was happening when React Devtools was active in both the browser extension and the standalone client -- closing one fixed the other 🥳

If you're going to use the standalone client, you can disable the browser extension entirely or make sure that the dev tools aren't open. If the dev tools have been opened on your app's tab, you'll need to close them and reload the page with them closed to make sure the browser extension isn't active

luukvankooten commented 7 months ago

I got the same issue on React Native/expo. The issue occurs when the app is reloading.

Kentokamoto commented 7 months ago

Kinda going off of what @KaiVandivier mentioned about multiple active instances of React DevTools, turns out I was calling connectToDevTools() from the react-devtools-core package on startup.

Removing connectToDevTools() seems to have resolved the issue for me.

RohovDmytro commented 7 months ago

I was not able to locate the roots of the issue, but it occurs in my setup too.,

RohovDmytro commented 7 months ago

If I dismiss the error and try to debug I get this:

(node:8689) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Expo::RELOAD listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
julianhahn commented 4 months ago

I'm using the 'createPortal' API and have a feeling, that as soon as I run the the code which includes the portal, the devtools stop afterwards. Kinda annoying, because I use it to implement a 'window-dragging' functionality. The component starts of with a deeply, nested relative component, on drag will rerender but this time as a component inside the createPorta, and set to the document.body as parent.

Reloading resets the devtools and therefore the error, but it also sets my component back in place. Thus I have no way of debugging a component, after it has been moved in the dom by the portal.