4

Describe

I run react native android in genymotions , when i open JS Debugging , Chrome op http://10.0.3.2:8081/debugger-ui not http://localhost:8081/debugger-ui/ , so the genymotion log can't connect debug , why is that ? how to fix it ?

Environment

  • macOS: 10.13.3
  • android: 6.0.0
  • genymotion: 2.12.0
  • react-native: 0.53.3
2
  • 1
    Isn't there already anything on that port? Commented Mar 5, 2018 at 7:09
  • 1
    @Andronicus yes, this port can't open in fact, my other app open localhost:8081/debugger-ui default , but this app use react-native 0.53.3 open 10.0.3.2:8081/debugger-ui Commented Mar 5, 2018 at 8:06

1 Answer 1

6

Let's fix your problem. Please follow these steps:

  • Open the app in the emulator
  • Press Ctrl + M to open the Dev menu, then tap Dev Settings
  • Choose Debug server host & port for device
  • Modify value to 127.0.0.1:8081 or simply localhost:8081 and now reload the app. You will now be able to debug.

PS: Some tutorial might have recommended you to install the Chrome extension to allow CORS, but it is not needed. The method above is simpler.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.