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. #23035

Closed
TamaraMalakhova opened this issue Dec 27, 2021 · 13 comments
Labels

Comments

@TamaraMalakhova
Copy link

TamaraMalakhova commented Dec 27, 2021

Website or app

It's empty project creating with 'react-native init'

Repro steps

  1. Start rn app in debug mode

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 /Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:140545
    at c.emit (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:89515)
    at /Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:90986
    at /Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:347787
    at Array.forEach (<anonymous>)
    at S.Gc.e.onmessage (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:347771)
    at S.n (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:40:3009)
    at S.emit (events.js:315:20)
    at e.exports.P (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:9318)
    at e.exports.emit (events.js:315:20)
    at e.exports.dataMessage (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:15409)
    at e.exports.getData (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:14651)
    at e.exports.startLoop (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:12066)
    at e.exports._write (/Applications/React Native Debugger.app/Contents/Resources/app.asar/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
@TamaraMalakhova TamaraMalakhova added Component: Developer Tools Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug labels Dec 27, 2021
@AirZT11
Copy link

AirZT11 commented Dec 28, 2021

I'm also getting this error!

@TamaraMalakhova
Copy link
Author

I'm also getting this error!

Hope It will be resolved soon. Do you have this problem on Mac with M1?

@systemidx
Copy link

I'm also getting this.

Dev Environment: Windows 11
Target: Android Emulator, Pixel 4, API 30
React Native Debugger - v0.12.1
React Native - v0.66.4

@sdelrio
Copy link

sdelrio commented Dec 31, 2021

Dev Environment: Linux
$ node --version
v16.9.0

packages.json
"@mdx-js/react": "^1.6.21",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",

@mikeogi
Copy link

mikeogi commented Jan 1, 2022

Error went missing after adding to package.json
"resolutions": { "react-devtools-core": "4.11.0" },
but there was message about unsupported devtools backend version. Use flipper. More about the problem there

@boxedition
Copy link

boxedition commented Jan 5, 2022

Bump.

Win 10 - Target: Android Emulator, Pixel 2, API 30

[Info]
You are running react-devtools version 4.14.0-d0ec283819
Tryed to do: npm i -g react-devtools@^4.22.0 (Nothing)

node -v 16.13.1
npm -v 8.1.2

Fresh Expo from (04/01/2022) and RND 0.12.1 (downloaded by 05/01/2022)

"dependencies": {
"expo": "^44.0.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-google-places-autocomplete": "^2.4.1",
"react-native-safe-area-context": "3.3.2",
"react-native-vector-icons": "^9.0.0",
"react-native-web": "0.17.1"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@types/expo": "^33.0.1",
"@types/react": "^17.0.38",
"@types/react-native": "^0.66.11",
"@types/react-native-vector-icons": "^6.4.10",
"ts-node": "^10.4.0",
"typescript": "^4.5.4"
},

[UPDATE]
Tried React Devtools (npm install -g react-devtools), when it launches i got the version 4.22.1-50c900b00
If i close and try with RND still pickup version 4.14.0-d0ec283819

@dimovj-dj
Copy link

I'm also getting this error! Any progress in fix or some temporary solution?

@mikeogi
Copy link

mikeogi commented Jan 11, 2022

I'm also getting this error! Any progress in fix or some temporary solution?

I have a bug missing, after all packages have been updated and changed to flipper devtools

@paulyiu-gammon
Copy link

paulyiu-gammon commented Jan 11, 2022

i am using react-native-debugger 0.12.1 and have some issue, it keep complaint react-devtools-core version;(

i can workaround it by:

  • add "resolutions": { "react-devtools-core": "~4.14.0" } to package.json
  • remove react-devtools-core in yarn.lock
  • yarn install --check-files

@Slyness98
Copy link

I'm also receiving this error, both with this package(@latest, v4.22.1) and in react-native-debugger v0.12.1. Here are my findings after combing through this issue, issue #21636, and a couple indirectly relevant SO questions: Those of you using NPM and encountering this in RNDebugger seem to be out of luck until another version is released, as it still uses React DevTools v4.14, whose compatibility is out of sync with react-devtools-core. I'll see if I can raise an issue or something in that repo to help get it back on track. NPM hasn't had a equivalent to yarn's "resolutions" which has been noted as a workaround above, but according to the bottom answer of this SO thread, it allegedly arrived as "overrides" in npm v8.3. I haven't upgraded nor tested this, but it may be worth taking a shot and seeing if it works. For those of you wanting to try this route, see the relevant portion of the npm docs here

I can however get the react-devtools package to work by bumping up my global installation of react-devtools-core to the latest v4.22.1, same as react-devtools. This just leaves us with the Profiler and Components tabs of React devtools, instead of RNDebugger's extra redux devtools and plain devtools integration, which is unfortunate but it's better than nothing.

For those of you like me who are brand new to React Native and these various standalone devtools outside the browser, have a look at how to customize the port that the react-devtools package listens to if your project's dev environment doesn't listen to the default port 8097.

@tam315
Copy link

tam315 commented Jan 12, 2022

@paulyiu-gammon 's quickfix worked for me! thanks.

Note that resolutions: "..." is need to be in the root package.json if the project is monorepo.
Writing in sub package's package.json didn't effect for me.

@tam315
Copy link

tam315 commented Jan 12, 2022

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.

@bvaughn
Copy link
Contributor

bvaughn commented Jan 12, 2022

I'm sorry you experienced this bug! 🙇

Looks like this problem was already reported though (#21636) so I'm going to mark this issue as a duplicate and close it. If you have additional context that might help us repro this problem, please leave a comment on the other issue!

Thank you~

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

No branches or pull requests

12 participants