React-native: Connection to http://localhost:8081/debugger-proxy timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in RCTWebSocketExecutor.m.

Created on 25 May 2017  路  12Comments  路  Source: facebook/react-native

In the use of iOS devices, real machine remote debugging when there will be this error,but using the emulator does not cause this problem:
"Connection to http://localhost:8081/debugger-proxy timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in RCTWebSocketExecutor.m."
wechatimg32
This problem still occurs when localhost is replaced with local IP.

Locked

Most helpful comment

I've got the same issue as well. Exactly the same code, same iPhone and MacBook do work fine at work but I am getting the above issue when I am at home. Note that everything was working fine last night at home.

So I guess there's probably something wrong with my router? Also last night I updated the Command Line Tools (just in case it helps).

image

Update: I can confirm that if I use my phone's Personal Hotspot (WiFi) everything work fine. So it is definitely my modem/router that is causing the issue - weird since I did not change anything since last night.

Update 2: After lots of investigation (I still haven't solved this issue), the Android version works fine. It is only iOS that has this problem (the simulator works fine - the problem is with the device). I've also tried with another MacBook (fresh installation of Mac OS) and latest XCode etc. I can also confirm that the same thing is happening with a fresh RN project! So still looking... Any ideas, more than welcome!

All 12 comments

@RamboLouis Are you running the javascript asset server with npm run start
If there's difficulties starting up the server, see if there's something already running on the port - i.e. nginx or such.

@AlanFoster The javascript asset server is already running , use iOS simulator and Android devices can be remotely debugged, only iOS devices can't be remotely debugged

Please follow the issue template

@RamboLouis hi, have you been able to resolve this issue for debugging iOS device?

@nazarTrynko Yes, I presume the iOS device and the computer in the same wifi network caused, and then switch to the another wifi signal.

same problem, not solved in my case. How should I proceed, please? what are the frequent causes?

I have the same problem here -- it used to work. The only thing that's changed is I updated a parent folder name. Do I have to also update something in the Xcode project?

I've got the same issue as well. Exactly the same code, same iPhone and MacBook do work fine at work but I am getting the above issue when I am at home. Note that everything was working fine last night at home.

So I guess there's probably something wrong with my router? Also last night I updated the Command Line Tools (just in case it helps).

image

Update: I can confirm that if I use my phone's Personal Hotspot (WiFi) everything work fine. So it is definitely my modem/router that is causing the issue - weird since I did not change anything since last night.

Update 2: After lots of investigation (I still haven't solved this issue), the Android version works fine. It is only iOS that has this problem (the simulator works fine - the problem is with the device). I've also tried with another MacBook (fresh installation of Mac OS) and latest XCode etc. I can also confirm that the same thing is happening with a fresh RN project! So still looking... Any ideas, more than welcome!

Switching to different wifi network worked for me

if you are getting this error you may not be connected to the internet on your device/simulator

If using a device (rather than the emulator) make sure that both the computer and device are on the same network.

For me this is always happening when I am working from a wifi that I've not connected to in the past. Make sure your device is connected to the same wifi as your laptop... I get myself with this nearly every time I work remote not at home!

Was this page helpful?
0 / 5 - 0 ratings