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

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

Closed
stall84 opened this issue Apr 19, 2021 · 30 comments · Fixed by #591

Comments

@stall84
Copy link

stall84 commented Apr 19, 2021

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

@edgecaststudio
Copy link

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

@ashuradji
Copy link

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

@MailosT
Copy link

MailosT commented Apr 21, 2021

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

@BenjaminSAILcloud
Copy link

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

@svgerasimov
Copy link

any workarounds?

@stall84
Copy link
Author

stall84 commented Apr 22, 2021

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

@jennthh
Copy link

jennthh commented Apr 22, 2021

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

2 similar comments
@basit3407
Copy link

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

@noopurphalak
Copy link

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

@vishnuc
Copy link

vishnuc commented Apr 25, 2021

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

@diessetechnology
Copy link

diessetechnology commented Apr 26, 2021

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

@zuizeze
Copy link

zuizeze commented Apr 27, 2021

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

@Phector27
Copy link

Same trouble with debugger.

I tried to cache clean but Im equal again

@mezhinsky
Copy link

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

@noopurphalak
Copy link

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

@noopurphalak
Copy link

@jhen0409 Please check this issue

@mezhinsky
Copy link

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

@noopurphalak
Copy link

@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
Copy link

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

@lawson-ng
Copy link

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

@dhguswns23
Copy link

dhguswns23 commented May 1, 2021

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

@santuman
Copy link

santuman commented May 1, 2021

Same Issue Here. Did anyone solved it?

@JavRok
Copy link

JavRok commented May 4, 2021

@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

@bvaughn
Copy link
Contributor

bvaughn commented May 5, 2021

The underlying cause for this is probably what's described here:
facebook/react#21326

Once you're running a version built after this PR, the situation should be clearer:
#587

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

@edgecaststudio
Copy link

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

@noopurphalak
Copy link

noopurphalak commented May 7, 2021

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.

@edgecaststudio
Copy link

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! :)

@stall84
Copy link
Author

stall84 commented May 9, 2021

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

@DavidFlores24
Copy link

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

Running RN: 0.63.4

@danieloi
Copy link

danieloi commented Aug 7, 2021

I just downloaded the latest version from here

https://github.com/jhen0409/react-native-debugger/releases

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

Successfully merging a pull request may close this issue.