react: [DevTools Bug] Cannot add node "476" because a node with that id is already in the Store.

Website or app

https://zhivika.ru/product/26406103_plastyr_perc_bperf_10smh18sm_n

Repro steps

  1. Load page.
  2. Open react components.
  3. Click button “Смотреть все аптеки” for unfold all list.

How often does this bug happen?

Every time

DevTools package (automated)

react-devtools-extensions

DevTools version (automated)

4.13.5-0ae5290b54

Error message (automated)

Cannot add node “476” because a node with that id is already in the Store.

Error call stack (automated)

No response

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

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 26
  • Comments: 46 (20 by maintainers)

Most upvoted comments

Just reproduced in Chrome using standalone react-devtools simultaneously with the browser extension. Even though the steps to reproduce might not be the same as the original reporter, as well as being misuse of the extension, I hope they might giva a clue to the root cause.

Uncaught Error: Cannot add node "1" because a node with that id is already in the Store.

Prerequisites:

  1. Installed standalone React devtools (Electron app)
  2. React app prepared for profiling with standalone React devtools (Electron app)

Steps to reproduce:

  1. Activate React devtools profiler in Chrome
  2. Reload page in Chrome
  3. Start standalone React devtools (Electron app)
  4. Reload page in Chrome and see error message
The error was thrown at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25113:41
    at bridge_Bridge.emit (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23328:22)
    at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23488:12
    at listener (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:51486:39)

Edit: Just got the same error message in standalone react-devtools after reloading the page a few times while standalone react-devtools were running.

Screenshot 2021-08-31 at 09 29 49

I’m able to periodically reproduce this bug, so I can take a look next time it comes up!

Here is another repro: https://github.com/facebook/react/issues/23035#issuecomment-1010676425

Thanks @junkboy0315!


I realized that upgrading react-devtools-core >= 4.22.0 breaks react-native-debugger.

Minimal reproductive sample (zip)

This sample works fine with debugger at first. (it uses react-devtools-core v4.21.0) But it will break if you follow the steps below.

  • remove react-devtools-core in yarn.lock. <- v4.21.0 will be removed
  • run yarn add react-devtools-core. <- v4.22.1 will be installed
  • run expo, and then, you can see that devtools is broken.

Maybe this bug gone. For now I’m using v4.22.0-0229baee2

Just produced today. image

The image file is missing

I faced this issue when I had two devtools frontend open, one in the browser extension and a devtools standalone, closing one stopped giving this error. Maybe that’s what is causing this.

macOS 11.3.1 Macbook Pro M1, Firefox 89.0.1.

  1. I installed React devtools for the first time ever on Firefox on this computer
  2. Navigated to my localhost site that was already running before extension install
  3. Refreshed the page with cmd-R with DevTools open and Caching disabled in Firefox DevTools settings
  4. Observe Uncaught Error: Cannot add node "1" because a node with that id is already in the Store. on every single page reload. Also occurs on every single page navigation, but I get Uncaught Error: Cannot remove node "310" because no matching node was found in the Store. instead, where the node id changes every time. With the first error, I get node “1” every time.

Source is private, sorry