Quick Troubleshooting Flow
Use this flow when React Native wireless debugging stops working.
1. Check the Device
adb devices -l
Expected:
192.168.1.15:5555 device
If offline
adb kill-server
adb start-server
adb devices
If necessary, reconnect the phone:
adb connect PHONE_IP:5555
If no device appears
Check:
- Phone is connected to the same Wi-Fi.
- USB debugging is enabled when using USB.
- Phone's IP address is correct.
- ADB TCP mode is enabled.
adb tcpip 5555
adb connect PHONE_IP:5555
2. Run React Native
npx react-native run-android
Now identify where the command fails.
3. Build Fails
If Gradle fails before installing the APK, investigate:
- Android SDK
android/local.properties- Java/JDK
- Gradle
- Build Tools
- Project dependencies
For example:
SDK location not found
-> Check Android SDK configuration.
Then:
cd android
gradlew clean
cd ..
Try again:
npx react-native run-android
4. Build Successful → Installation Fails
If you see BUILD SUCCESSFUL but :app:installDebug FAILED, the build itself succeeded. Read the actual installation error.
Requested internal only, but not enough space
-> Free storage on the device.
adb shell df -h /data
InstallException: EOF
-> Investigate ADB/device communication.
Try:
adb devices
Then manually install the APK:
adb install -r "C:\\android\app\build\outputs\apk\debug\app-debug.apk"
If manual installation succeeds, the APK is valid.
5. APK Installs Successfully
If Performing Streamed Install / Success, then APK installation is working.
Launch the app if necessary:
adb -s PHONE_IP:5555 shell am start -n com.yourapp/.MainActivity
If the app launches but shows Unable to load script, move to Metro troubleshooting.
6. Metro Troubleshooting
Start Metro:
npx react-native start
You should see:
Welcome to Metro
INFO Dev server ready.
If Metro says No apps connected, check:
adb devices
7. Try ADB Reverse
For the connected device:
adb -s PHONE_IP:5555 reverse tcp:8081 tcp:8081
Check:
adb -s PHONE_IP:5555 reverse --list
Expected:
tcp:8081 tcp:8081
Then reload/restart the app.
8. If adb reverse Doesn't Work
Try accessing Metro directly from the phone.
Find the PC's IP:
ipconfig
Example:
PC = 192.168.1.14
Phone = 192.168.1.15
Remember:
Phone IP -> ADB
PC IP -> Metro
Open on the phone:
http://192.168.1.14:8081
9. Phone Browser Can't Open PC_IP:8081
Check in this order:
Metro running?
|
Correct PC IP?
|
Port 8081 listening?
|
Windows Firewall?
|
Same Wi-Fi?
|
Router/client isolation?
Check port:
netstat -ano | findstr :8081
If nothing is listening, Metro is probably not running on port 8081.
10. Phone Browser Can Open Metro
If http://PC_IP:8081 opens successfully:
Phone -> PC network connection works
Port 8081 is reachable
Metro is running
If React Native still shows Unable to load script, investigate the React Native development-server configuration rather than the router.
The 5-Step Rule
When something fails, identify the stage first:
1. ADB
|
2. Gradle Build
|
3. APK Installation
|
4. App Launch
|
5. Metro / Port 8081
Don't troubleshoot all five at once.
Quick Command Checklist
:: 1. Check device
adb devices -l
:: 2. Check ADB version
adb version
:: 3. Connect wireless device
adb connect PHONE_IP:5555
:: 4. Check PC IP
ipconfig
:: 5. Check port 8081
netstat -ano | findstr :8081
:: 6. Reverse Metro
adb -s PHONE_IP:5555 reverse tcp:8081 tcp:8081
:: 7. Check reverse
adb -s PHONE_IP:5555 reverse --list
:: 8. Manually install APK
adb install -r "PATH_TO_APP_DEBUG_APK.apk"
Then:
# Start Metro
npx react-native start
# Run React Native
npx react-native run-android
Most Important Rule
Always find the last stage that succeeded before troubleshooting.
For example:
BUILD SUCCESSFUL
|
APK installation FAILED
-> Don't troubleshoot Metro yet.
Or:
BUILD SUCCESSFUL
|
APK installation SUCCESSFUL
|
App launches
|
Unable to load script
-> Don't troubleshoot Gradle or APK installation anymore. Focus on Metro and port 8081.