Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-native Timeout when connecting to remote debugger in windows

I am new to React-Native and android app development as a whole. While i try to run remote debugger in Android Emulator (Pixel 2 phone), I get the following error in the emulator: Error on Emulator

Then after, even if I stop remote debugging, the application won't run on the emulator (i.e. nothing is rendered into the emulator screen). I need to run the project again.

Following is the auto-generated debugger URL: http://10.0.2.2:8081/debugger-ui

How can I Fix this problem?

like image 668
Sarun Dahal Avatar asked Mar 12 '18 12:03

Sarun Dahal


People also ask

How do I use react native debugger in Windows?

Connecting a React Native app to React Native Debugger To connect your app with React Native Debugger, you need to run your app and start debug mode. To start debug mode, shake your mobile device or press Command + Shift + Z or Ctrl + M and choose the debug option. We're all set to begin using React Native Debugger.

How do I enable remote debugging in react native?

For Android: Ctrl + M (emulator) or Shake the phone (In Device) to reveal menu. Make sure you have chrome. On the revealed menu select Debug JS Remotely Option. Chrome will be opened automatically at localhost:8081/debugger-ui.

How do I enable react native debugger?

In App Developer Menu You can open the developer menu on the IOS simulator by pressing command + D. On Android emulator, you need to press command + M. Debug JS Remotely − Used for activating debugging inside browser developer console.


2 Answers

http://10.0.2.2:8081/debugger-ui This is internal IP the Android VM, with your browser use localhost:8081/debugger-ui reference https://github.com/facebook/react-native/issues/16674#issuecomment-376774645

like image 100
Sohan Avatar answered Sep 28 '22 18:09

Sohan


uninstall your application, then run => react-native run-android in terminal then click debugging end in chrome replace http://localhost:8081/debugger-ui/, end run react-native run-android. if you still haven't succeeded try again

like image 38
muhyidin Avatar answered Sep 28 '22 18:09

muhyidin