react-native-debugger icon indicating copy to clipboard operation
react-native-debugger copied to clipboard

Debugger 'hangs' 'Loading' and errors cannot read prop forEach of undefined when trying to inspect component element

Open stall84 opened this issue 5 years ago • 30 comments

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

stall84 avatar Apr 19 '21 15:04 stall84

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

edgecaststudio avatar Apr 19 '21 23:04 edgecaststudio

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

ashuradji avatar Apr 20 '21 00:04 ashuradji

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

MailosT avatar Apr 21 '21 22:04 MailosT

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

BenjaminSAILcloud avatar Apr 22 '21 08:04 BenjaminSAILcloud

any workarounds?

svgerasimov avatar Apr 22 '21 14:04 svgerasimov

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

stall84 avatar Apr 22 '21 16:04 stall84

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

jennthh avatar Apr 22 '21 17:04 jennthh

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

basit3407 avatar Apr 24 '21 06:04 basit3407

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

noopurphalak avatar Apr 25 '21 12:04 noopurphalak

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

vishnuc avatar Apr 25 '21 20:04 vishnuc

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

diessetechnology avatar Apr 26 '21 06:04 diessetechnology

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

zuizeze avatar Apr 27 '21 12:04 zuizeze

Same trouble with debugger.

I tried to cache clean but Im equal again

Phector27 avatar Apr 28 '21 10:04 Phector27

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 avatar Apr 28 '21 12:04 mezhinsky

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

noopurphalak avatar Apr 28 '21 13:04 noopurphalak

@jhen0409 Please check this issue

noopurphalak avatar Apr 28 '21 13:04 noopurphalak

@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 avatar Apr 28 '21 16:04 mezhinsky

@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.

noopurphalak avatar Apr 29 '21 07:04 noopurphalak

@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 :(

mezhinsky avatar Apr 29 '21 07:04 mezhinsky

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

lawson-ng avatar Apr 29 '21 09:04 lawson-ng