15

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?

Sarun Dahal
  • 377
  • 1
  • 5
  • 17
  • Try running ’react-native start’ in a separate command/terminal window and them when debugger started successfully run your app in a separate window. – bennygenel Mar 12 '18 at 12:07
  • 4
    Whenever i manually insert the URL: http://localhost:8081/debugger-ui/ and then re-run the application using react-native run-android , and then start debugger it works. Otherwise in case of the auto-generated debugger URL: http://10.0.2.2:8081/debugger-ui, it deos not work!! I tried changing default debug server URL, but then it throws some new error along the way.. what can i do here? – Sarun Dahal Mar 12 '18 at 13:50
  • same as above, using React Native 0.55. got URL 10.0.2.2:8081/debugger-ui and timeout, use localhost and it work – NamNamNam Apr 17 '18 at 05:23
  • 2
    Please use http://localhost:8081/debugger-ui/ instead of http://10.0.2.2:8081/debugger-ui the React Native version is 0.55.4. – Yang Wang Jul 03 '18 at 06:26

2 Answers2

25

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

Sohan
  • 1,121
  • 1
  • 14
  • 27
1

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

muhyidin
  • 189
  • 2
  • 7