React-native-debugger: Waiting for React to connect (but redux works)

Created on 4 Aug 2017  ·  17Comments  ·  Source: jhen0409/react-native-debugger

Hi,

I'm getting the common 'Waiting for React to connect' bug and have tried the fixes previously mentioned in other issues. It seems like the debugger is connecting to the device, as my redux dev tools work, but it just won't connect to React.

It was working yesterday and even after reverts in git it's still broken.

React Native Debugger version: 0.7.3
React Native version: 47.0
Platform: IOS
Is real device of platform: Yes, but simulator also broken
Operating System: macOS

cannot-reproduce

Most helpful comment

Gotcha! I needed to enable debug js remotely on my emulator.Damnit. :P

All 17 comments

If RNDebugger still showing Waiting for React to connect, it's meaning your app haven't try to connect React DevTools server, you can check this file from react-native.

For real device please ensure you have read How to use it with real device? section of react-devtools-integration.md. For iOS simulator I have never failed to connect, so you need to check if you do something wrong.

Yes I've seen that doc. It was working fine on simulator and device and has randomly stopped working.

Can confirm this on latest 0.7.4 too.

I'm not sure if it's related to this change, it's only one change recently, but it actually works for me. Or you can try v0.7.2 for downgrade react-devtools-core to v2.4

Can confirm this. But this bug appears only in physical device. In emulator all works properly.

Can confirm this. But this bug appears only in physical device. In emulator all works properly.

@alexey-kuznetsov It should impossible if you have read How to use it with real device? section and ensure no any connection problems in your case. It just a websocket connection.

The main point is iOS simulator also broken for this issue let me confused. 🤔

Actually this issue may not related here, we just listen a random port and set __REACT_DEVTOOLS_PORT__ to RN env (and default theme setup), otherwise it have no different from react-devtools-core. We can debug setupDevtools.js of RN to tracking the issue, currently I can't to help because the problem can't reproduce for me.

@jhen0409 thank you! This solution solved my problem!

I had a similar problem, where Redux was working, but both react-devtools (tried downloading and installing separately) and RND was was showing "Waiting for React to connect".

Turns out I forgot that I had connected to packager over WiFi 🤦‍♂️, so connecting the physical Android device to my machine via USB solved the problem 👍

Maybe we could add some tips in UI to avoid such misunderstanding.

UPDATED: Added in https://github.com/jhen0409/react-native-debugger/commit/5e17d036769f73ef970fd948b29d697851617d1d.

I am new to react native and have downloaded your application just coz it's a hype in react community.However,I cant connect my react app.I have my android simulator running but this still says that waiting for react app to connect.Please help me with this

Gotcha! I needed to enable debug js remotely on my emulator.Damnit. :P

Does anyone know what to do, if I cant enable it in expo? It just says 'Remote debugger unavailable', see the picture.
This is on a iPhone simulator running on my mac.

The redux and console stuff works, but it just says 'waiting for react to connect...' in the react part. It worked yesterday, and I have tried to go back in git to a place where I know it worked, but it doesn't solve my problem. I even switched branch to a brach that works on my co-workers computer, and this it not the issue.
A couple of times I've also gotten a 'Runtime is not ready for debugging. Make sure packager server is running'-error with a red screen on my simulator, but it only appears sometimes.

Does anybody know what I am doing wrong? :)

screen shot 2018-05-24 at 11 52 10

Hi @Lineakat, I found the solution to turn Remote Debugger back on in this comment in expo/expo#1210

it's as simple as toggling the development mode, reloading JS bundle and refreshing a couple of times.
hope it helps.

Hi @Charlie-Hua !
I dont know what I did, but at one point (a couple of days later) it just worked again? So I never got to try out your solution, but thanks so much for answering! If it happens again, I will definitely try this :)

Gotcha! I needed to enable debug js remotely on my emulator.Damnit. :P

OMG thanks! How is this not written everywhere?

On real device: Shake device & Click "Debug Remote JS".
On Simulator: Try: Cmd or control + D on the Simulator & Click "Debug Remote JS".

for windows users, you should disable and re-enable Debugging from developer menu and it may show windows firewall popup. after you allow, it should work as expected.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arrygoo picture arrygoo  ·  5Comments

idrakimuhamad picture idrakimuhamad  ·  3Comments

usrbowe picture usrbowe  ·  6Comments

Clete2 picture Clete2  ·  5Comments

cvvspb picture cvvspb  ·  3Comments