Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native Unable to connect with remote debugger ECONNREFUSED

Tags:

react-native

I understand that this has been asked many times before but none of the solutions work for me. Here is the screen grab of my device(android 6.0.1 samsung J210F): enter image description here

When I open localhost:8081/debugger-ui I get this message: enter image description here

So debugger is running on 8081. BUT it gives this message on console: enter image description here

The reverse tcp command has already been executed by the debugger: enter image description here

(The full error that got clipped was Error running 'RN': timeout on waiting for connection to React Native packager. Make sure you have selected 'Debug JS Remotely' from the Developer Menu. I have already selected "Debug JS Remotely" from developer menu so I don't think thats the reason.

I hope I provided all the information. Have been struggling for hours to solve this.

like image 447
rahulserver Avatar asked Feb 27 '18 04:02

rahulserver


2 Answers

Just run the command adb reverse tcp:8081 tcp:8081 and then run react-native run-android. The problem would be solved.

like image 165
kamal11 Avatar answered Dec 13 '22 16:12

kamal11


Before enabling remote debugging on your emulator, open http://localhost:8081/debugger-ui in chrome. Then enable remote debugging and go back to the chrome page where you should see your console logs.

Reference

like image 38
Vijay Vavdiya Avatar answered Dec 13 '22 14:12

Vijay Vavdiya