Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
edapess opened this issue Apr 25, 2022 · 8 comments
Assignees

Comments

@edapess
Copy link

edapess commented Apr 25, 2022

Website or app

https://github.com/edavetisyan/Recipes

Repro steps

running react-native debugger

How often does this bug happen?

Every time

DevTools package (automated)

react-devtools-core

DevTools version (automated)

4.14.0-d0ec283819

Error message (automated)

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

Error call stack (automated)

at /usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:48:140545
    at c.emit (/usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:48:89515)
    at /usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:48:90986
    at /usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:48:347787
    at Array.forEach (<anonymous>)
    at S.Gc.e.onmessage (/usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:48:347771)
    at S.n (/usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:40:3009)
    at S.emit (events.js:315:20)
    at e.exports.P (/usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:8:9318)
    at e.exports.emit (events.js:315:20)
    at e.exports.dataMessage (/usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:8:15409)
    at e.exports.getData (/usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:8:14651)
    at e.exports.startLoop (/usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:8:12066)
    at e.exports._write (/usr/lib/react-native-debugger/node_modules/react-devtools-core/dist/standalone.js:8:11421)
    at doWrite (_stream_writable.js:403:12)
    at writeOrBuffer (_stream_writable.js:387:5)

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
@edapess edapess added Component: Developer Tools Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug labels Apr 25, 2022
@rileyhemp
Copy link

@edavetisyan I was having the same issue and it turns out I had two instances of React Dev Tools running concurrently.

What I think happened is that when I turned on Sync in Edge, it had installed a second instance of Dev Tools. Notice I have 'components' and 'profiler' showing up twice here. Removing one fixed it for me.
image

@lunaruan
Copy link
Contributor

lunaruan commented May 4, 2022

Hey! It seems like you might be having a DevTools version mismatch. The DevTools version in your react native app seems to be v4.14.0, but your have a local react-devtools dependency that's v4.23.0. Could you check to make sure the react-devtools-core version that react-native is using matches the react-devtools version?

@beng970804
Copy link

beng970804 commented May 7, 2022

"dependencies": { "expo": "~45.0.0", "expo-status-bar": "~1.3.0", "react": "17.0.2", "react-dom": "17.0.2", "react-native": "0.68.1", "react-native-web": "0.17.7" }, "devDependencies": { "@babel/core": "^7.12.9" },

Attached above is my fresh install expo project, it have the same error

@eeshankeni
Copy link

eeshankeni commented May 12, 2022

Fixed this by adding

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

to package.json. And also I installed [email protected] using yarn. Make sure the version of react-devtools-core is the same as that in react native debugger (or whatever you're using to run react devtools)

@maximveksler
Copy link

"dependencies": { "expo": "~45.0.0", "expo-status-bar": "~1.3.0", "react": "17.0.2", "react-dom": "17.0.2", "react-native": "0.68.1", "react-native-web": "0.17.7" }, "devDependencies": { "@babel/core": "^7.12.9" },

Attached above is my fresh install expo project, it have the same error

Same here.

{
  "name": "app.savy.maxdoingmax",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "~44.0.0",
    "expo-status-bar": "~1.2.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-web": "0.17.1",
    "expo-splash-screen": "~0.14.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/react": "~17.0.21",
    "@types/react-native": "~0.64.12",
    "typescript": "~4.3.5"
  },
  "private": true
}

@maximveksler
Copy link

maximveksler commented May 15, 2022

Possible Solution suggestion [TESTING NOW]

Solution worked!

  1. Add to package.json
  "resolutions": {
    "react-devtools-core": "4.14.0"
  }
  1. Delete rm -rf node_modules/ && rm package-lock.json
  2. yarn install

@realadityayadav
Copy link

Removing the Tool from chrome and reinstalling it also fixes this.

@edapess edapess closed this as completed Sep 28, 2022
@edapess
Copy link
Author

edapess commented Sep 28, 2022

Removing the Tool from chrome and reinstalling it also fixes this.

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants
@maximveksler @lunaruan @eeshankeni @beng970804 @realadityayadav @edapess @rileyhemp and others