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

react-devtools: upgrade to version 2 of bridge protocol #709

Closed
mfulton26 opened this issue Jul 5, 2022 · 10 comments
Closed

react-devtools: upgrade to version 2 of bridge protocol #709

mfulton26 opened this issue Jul 5, 2022 · 10 comments

Comments

@mfulton26
Copy link

React Native Debugger app version: 0.12.1
React Native version: 0.69.1
Platform: any
Is real device of platform: platform
Operating System: macOS

Unsupported DevTools backend version

You are running react-devtools version 4.14.0-d0ec283819.

This requires bridge protocol version 1. However the current backend version uses bridge protocol version 2.

To fix this, upgrade the DevTools NPM package:

npm i -g react-devtools@^4.22.0

Or click here for more information.

image

@iwoplaza
Copy link

Same exact things happens to me. None of the recommended fixes from the click here section work either.

@pavelgorbach
Copy link

pavelgorbach commented Jul 21, 2022

@mfulton26 , could you check if it works for you?

  1. remove node modules rm -rf node_modules
  2. add resolutions to your package.json (only works with yarn)
"resolutions": {
    "react-devtools-core": "4.14.0"
 }
  1. install dependencies yarn install or npm install

UPD: do these steps inside your project folder

@mfulton26
Copy link
Author

I installed react-native-debugger using the installer from the releases page.

@mfulton26
Copy link
Author

I think we just need a new maintenance release of this tool with dependencies upgraded and we'll be set. I suspect/hope this will be an easy fix.

@pavelgorbach
Copy link

Yes, but if you want to debug some of your react-native projects right now, just try to add resolutions to the package.json of the project you are going to run.

@mfulton26
Copy link
Author

I see, yeah, that might work. I can try that the next time I need to use this tool. For me the tool appears to mostly work fine. (Some issues with not recognizing the GraphQL requests ending on their own; not sure if that is related to this or not.)

Thanks. I'll try the workaround at some point.

@mfulton26
Copy link
Author

Confirmed. I get no "Unsupported DevTools backend version" error with the resolutions addition in my React Native app.

This workaround seems fine for now but eventually I'd like to see another react-native-debugger release which uses the new react-devtools-core version.

Is that an option? I see that most of the commits lately are from dependabot and the last release was almost a year ago.

@ivanmercedes
Copy link

I fix this problem as follows

Enter the resources folder of my React Native Debugger installation

in my case I have it on disk D:

cd D://rndebugger/resources
npx asar extract unpacked/ app.asar
cd unpacked/
npm install react-devtools-core@latest
cd..
npx asar pack unpacked/ app.asar
rm -r unpacked

and that's it!

@steenhansen
Copy link

Using React Native Debugger 0.12.1 (github.com/jhen409) on Windows

Did NOT "npm i -g react-devtools@^4.22.0"

npm list -g
+-- corepack@0.10.0
+-- eas-cli@0.57.0
+-- expo-cli@6.0.1
+-- npm@8.11.0
`-- yarn@1.22.19

package.json (note "react-native/react-devtools-core" NOT "react-devtools-core")
"resolutions": {
"react-native/react-devtools-core": "4.14.0"
},
"dependencies": {
"@react-navigation/native": "^6.0.11",
"expo": "~45.0.0",
"expo-status-bar": "~1.3.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-redux": "^8.0.2",
"redux": "^4.2.0"
},

  1. delete node_modules
  2. "yarn install" as "npm install" does not work
  3. celebrate

@mfulton26
Copy link
Author

Fixed via #706.

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

No branches or pull requests

5 participants