Answer the question
In order to leave comments, you need to log in
React Native debugger not opening. Problem in metro?
Hello!
There is a project on React Native. I am using Android Studio. A mobile phone is connected instead of an emulator.
I do react-native run-android
. The application is installed on the phone and it works.
Problem: react native debugger doesn't work. At all.
Long torment led me to the idea that the metro does not start. Indeed, in theory, the server should start in the terminal window (and not close at the same time), which does not happen. But how to achieve this - I do not know.
adb shell input keyevent 82
-> Dev Settings -> Debug server host & port for device
In this window, the previous developer did not have anything filled in at all. And yet it worked for him. For me, it does not work. The most interesting thing is that I work on his computer and did not change anything at all. After many attempts, changes in Debug server host & port for device, I no longer know how to get the debugger to work.
I tried to connect via Wi-Fi with ip-address:8081
I tried to connect with localhost, localhost:8081
I tried to install react-native-debugger from the official site.
The result is complete silence in the computer and an error in the phone.
I tried adb reverse tcp:8081 tcp:8081
Tried adb -s <device name> reverse tcp:8081 tcp:8081
(as the official site says)
Every time a screen appears with the error "Unable to connect with remote debugger".
In Chrome, localhost:8081/debugger says "Can't access site".
I read everything on this site, but none of the tips helped.
The same error occurs in the emulator.
Maybe in adb you need to perform some manipulations?
Maybe the previous developer wrote something in the settings that does not allow you to connect other devices?
Please tell me how can I make the debugger work? Or how can you be sure that metro is working properly?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question