React-native-debugger: Debugger 'hangs' 'Loading' and errors cannot read prop forEach of undefined when trying to inspect component element

Created on 19 Apr 2021  路  29Comments  路  Source: jhen0409/react-native-debugger

React Native Debugger app version: [0.11.6]
React Native version: [0.63.4]
Platform: [iOS]
Is real device of platform: [Yes]
Operating System: [MacOS]

When I try and inspect any component in the react devTools panel of the debugger, it hangs at 'Loading' and console errors 'Cannot read property forEach of undefined'. Everything I can find on this issue points to updating the version of React devTools.. But although I'm able to update the React Native Debugger to the latest version (which it is). I cannot update the version of React Dev Tools that it is using internally (appears to be using 4.6.0). But I don't know if that's even the issue. I'm guessing it's expecting an array from something that's an object instead.
Screen Shot 2021-04-19 at 11 19 11 AM

Most helpful comment

@mezhinsky So, how do you update the react-devtools in react native debugger?

To update to latest version with homebrew:

brew reinstall --cask react-native-debugger

All 29 comments

Same issue. Taking a udemy course and a handful of other people are experiencing it as well.

Same issue here, i verified this problem by downloading a past project that i made but the error doesn't happen there. Both projects use Typescript

This is my current project store (That presents the error)

import { applyMiddleware, createStore } from "redux";
import { composeWithDevTools } from "redux-devtools-extension/developmentOnly";
import rootReducer from "./reducers/root.reducer";
import thunk from "redux-thunk";

const store = createStore(
  rootReducer,
  composeWithDevTools(applyMiddleware(thunk))
);

export type RootStore = ReturnType<typeof rootReducer>;

export default store;
````
This is my project's dependencies:

"dependencies": {
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/bottom-tabs": "^5.11.10",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "^5.14.4",
"axios": "^0.21.1",
"expo": "~40.0.0",
"expo-status-bar": "~1.0.3",
"radio-buttons-react-native": "^1.0.4",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-gesture-handler": "~1.8.0",
"react-native-reanimated": "~1.13.0",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "~2.15.2",
"react-native-web": "~0.13.12",
"react-redux": "^7.2.3",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.3.0"
},
```
I'm suppose that the bug comes from a react native update and not directly from the developer tools

Same issue here. / "react-native": "0.64.0", / RND: 0.11.5

Also same issue. I tried previous version of the debugger and it does not work either.

any workarounds?

any workarounds?

I realllly need the (awesome) redux inspector this provides so what I'm going to maybe attempt is using react-devtools for inspecting the components and just try to use the redux tools on this application .. I think that might side-step the problem. But if you need to be able to inspect the components and their state/hooks/refs etc .. for right now i'd recommend npm i react-devtools

Same here. "react-native": 0.64.0, RND: "0.11.7"

Same here. "react-native": 0.64.0, RND: "0.11.7"

Same here. "react-native": 0.64.0, RND: "0.11.7"

Same problem for me. "react-native": 0.63.0, RND: "0.11.7"

Same problem on my app

React Native: 0.63.4
React Native Debugger: 0.11.7

I hope this issue is going to be fixed very soon because i have a deadline on that app.

This bug have suddenly appeared this night. Before, i had no problems. Very strange...

Same problem
I try to reinstall , but useless
When will this issue can be fixed

Same trouble with debugger.

I tried to cache clean but Im equal again

I think its 4.10.1 version of nested react-devtools problem, in original react-devtools current version 4.12 and no problems with component node preview

@mezhinsky So, how do you update the react-devtools in react native debugger?

@jhen0409 Please check this issue

@mezhinsky So, how do you update the react-devtools in react native debugger?

fork this app and change version of react-devtools in package.json and then build this app, or just wait when @jhen0409 fix that for us :)

@mezhinsky tried changing the react-devtools-core version to 4.12.0 and built the app installer using yarn pack-linux as I am on linux. The app got installed, but is not opening.

@mezhinsky tried changing the react-devtools-core version to 4.12.0 and built the app installer using yarn pack-linux as I am on linux. The app got installed, but is not opening.

can't help you with that - never build electron apps :(

Same issue
Screen Shot 2021-04-29 at 16 57 06

Same issue on RN 0.64.0, RND 0.11.7, react-devtools 4.12.4. Any workaround?

Same Issue Here. Did anyone solved it?

@mezhinsky So, how do you update the react-devtools in react native debugger?

To update to latest version with homebrew:

brew reinstall --cask react-native-debugger

The underlying cause for this is probably what's described here:
https://github.com/facebook/react/issues/21326

Once you're running a version built after this PR, the situation should be clearer:
https://github.com/jhen0409/react-native-debugger/pull/587

Here's the page I created describing common "fixes" for this issue:
https://fb.me/devtools-unsupported-bridge-protocol

Did anyone get this to work? I've tried about everything... still getting the 'forEach' of undefined issue.

Did anyone get this to work? I've tried about everything... still getting the 'forEach' of undefined issue.

Install react-native-debugger version 0.11.8 and it should work fine.

Did anyone get this to work? I've tried about everything... still getting the 'forEach' of undefined issue.

Install react-native-debugger version 0.11.8 and it should work fine.

Steps I took to get this to work on. Mac:

  • brew upgrade
  • brew uninstall --cask react-native-debugger
  • brew install --cask react-native-debugger

Yea finally! :)

Did anyone get this to work? I've tried about everything... still getting the 'forEach' of undefined issue.

Install react-native-debugger version 0.11.8 and it should work fine.

Steps I took to get this to work on. Mac:

* brew upgrade

* brew uninstall --cask react-native-debugger

* brew install --cask react-native-debugger

Yea finally! :)

These last two worked for me .. just running brew upgrade react-native-debugger didn't fetch 11.8 for whatever reason.. But running
brew uninstall --cask react-native-debugger brew install --cask react-native-debugger
DID

I've installed react-native-debugger v0.11.8 and I'm still getting the same error screen
image

Running RN: 0.63.4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndrewMorsillo picture AndrewMorsillo  路  15Comments

jan-happy picture jan-happy  路  29Comments

maxhungry picture maxhungry  路  50Comments

pvpshoot picture pvpshoot  路  33Comments

eshikerya picture eshikerya  路  39Comments