facebook / react

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

[DevTools Bug] Cannot remove node "276" because no matching node was found in the Store. #24608

Open Mancunia opened 2 years ago

Mancunia commented 2 years ago

Website or app

https://github.com/Fast-Pace-Transfer/analytics-dashboard-ui

Repro steps

I am trying save a randomly generated set of colors with matching countries as an object in the local storage from a context So it doesn't change colors after a manual refresh

How often does this bug happen?

Only once

DevTools package (automated)

react-devtools-extensions

DevTools version (automated)

4.24.6-ca7a38ae4

Error message (automated)

Cannot remove node "276" because no matching node was found in the Store.

Error call stack (automated)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26518:43
    at bridge_Bridge.emit (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:24436:22)
    at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:24605:14
    at listener (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:54547:39)

Error component stack (automated)

No response

GitHub query string (automated)

https://api.github.com/search/issues?q=Cannot remove node  because no matching node was found in the Store. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react
mondaychen commented 2 years ago

Hi thanks for reporting, but your website link is 404 (private repo?), and your repro description is pretty vague. Any chance you can provide more details?

Mancunia commented 2 years ago

Hi thanks for reporting, but your website link is 404 (private repo?), and your repro description is pretty vague. Any chance you can provide more details?

That is because it's a private repo,

Mancunia commented 2 years ago

So this happened whiles i was saving and retrieving data to and from a context to a local storage

mondaychen commented 2 years ago

@Mancunia I understand it happens when you perform this action, but it's unlikely that's the direct cause of this issue. I worked on a React app that saves and retrieves data from localStorage and it does not trigger this bug. Can you please provide a way to reproduce this issue (preferably via something like codesandbox.io)? Thanks

2sem commented 2 years ago
스크린샷 2022-06-04 오전 12 17 44

flipper

Segmentational commented 2 years ago

How does DevTools calculate the node count? For example, I can consistently reproduce this issue by toggling my loading state to true and false, but the Cannot remove node "<node-count>" message is non-deterministic (granted it's* non-deterministic for me due to my little experience using the tool).

I also am using Local Storage; however, did confirm that wasn't throwing any error(s).

I'll try here a bit to see what I can do to create a simplified, reproducible version of my application as example.

Segmentational commented 2 years ago

I was unable to reproduce easily. I'll check back sometime next week to see if an answer was provided to my first question.

Push comes to shove, I'll try my best to get an example working next weekend!

jcubic commented 2 years ago

I have the same error from CodeSanbox found a reference in https://github.com/pmndrs/react-three-fiber/discussions/928 but it's not related to react-three-fiber.

I have a basic reactJS app but with classes (Sorry, I'm refreshing my knowledge on old React).

https://codesandbox.io/s/kind-zeh-wnz86j?file=/src/components/App.tsx

and I have an error: Cannot remove node 13 because no matching node was found in the Store. the preview works fine, but I think that it simply hides the error because it's not dev mode. When I click submit it clears the console like in the editor, but I'm not 100% sure if the error is still there and not visible.

I also think that it's related to React DevTools because I've disabled those.

yongmin86k commented 2 years ago

https://github.com/facebook/react/issues/23202#issuecomment-1103314940

2sem commented 2 years ago

I found a solution for Cannot remove node "0"

"react-devtools-core": "4.24.3",

"resolutions": { "react-devtools-core": "4.24.3" },

https://github.com/facebook/flipper/issues/3649#issuecomment-1272444843