0
votes

I'm relatively new to react native, and had an issue in setting up the debugger in chrome for an android app built over react native. I have gone through the documentation mentioned https://facebook.github.io/react-native/docs/debugging.html. But i've still not been able to set up the proxy-debugger server. I have also explicitly mentioned my IP address in the app as mentioned above. When the app tries to hit the debugger route for some reason i get a 404 message.

request:/index.android.bundle?platform=android&dev=true&hot=false&minify=false (10ms) ::ffff:192.168.1.5 - - [06/May/2016:20:25:22 +0000] "GET / HTTP/1.1" 404 13 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"

Above are the logs i get on the node server and a copy of the response on hitting the request url route i get the following response.

Route:

http://192.168.1.5:8081/debugger-proxy/index.android.bundle?platform=android&dev=true&hot=false&minify=false

Below is the response i get in the browser

{
  message: "Cannot find entry file debugger-proxy/index.android.js in any of the roots: [" / Users / USERNAME / MyCode / Dictionary "]",
  name: "NotFoundError",
  type: "NotFoundError",
  status: 404,
  errors: [{}]
}
1
The error states that you have no index.android.js file where it should be (in the root of the project,) is this right? - Daniel Schmidt
Yes, but the index.android.js file does exist. - Nitish Phanse
Solved this, i had to go into the developer mode of the react native app on my device and enable Debug JS - Nitish Phanse

1 Answers

0
votes

Not sure if it will work for you but give it a try :

  • press cmd + m on emulator screen
  • go to Dev Settings > Debug server host & port of device
  • set localhost:8081 re-run the android app : react-native run-android

debugger should be connected now