Red screen: cannot reach Metro
Error text
Could not connect to development server. Try the following to fix the issue: • Ensure that Metro is running • Ensure that your device/emulator is connected to your machine and has USB debugging enabled
Cause
The debug app cannot reach the development server (Metro). The server is off, the port is blocked, or the device is on another network.
Step-by-step fix
- Check that Metro runs in the terminal:
npx react-native start. - For a USB device run
adb reverse tcp:8081 tcp:8081. - Over Wi-Fi keep the phone and the computer on the same network.
- If the network gets in the way, use
npx expo start --tunnel. - Let the firewall keep port 8081 open.
Example commands
adb reverse tcp:8081 tcp:8081 npx react-native start --port 8081 adb devices npx expo start --tunnel
How to prevent it
Keep other programs off the same port; run Metro in one dedicated terminal.
Author and license: Nibras Code
- APK will not install
- What is a parse error?
- The keystore is lost
- The signatures do not match
- Package name error
- The APK file is damaged
- Play Protect blocks the app
- The package appears to be invalid
- Not enough storage
- The phone is not compatible
- An older version will not install
- XAPK will not install
- Gradle sync failed
- Could not resolve a dependency
- Duplicate class error
- Manifest merger failed
- Dex limit: 65536 methods
- R8: Missing class
- JDK version mismatch
- SDK location not found
- minSdkVersion conflict
- compileSdk is too low
- EAS build: Gradle failure
- expo prebuild error
- Metro: Unable to resolve module
- Hermes: JS error only in release
- White screen in release
- Expo SDK mismatch
- Capacitor sync error
- Capacitor: white screen
- EAS: keystore and credentials error
- Keystore was tampered with / wrong password
- Wrong key alias or password
- Play: signed with the wrong key
- INSTALL_FAILED_UPDATE_INCOMPATIBLE
- INSTALL_FAILED_VERSION_DOWNGRADE
- INSTALL_FAILED_INSUFFICIENT_STORAGE
- INSTALL_FAILED_NO_MATCHING_ABIS
- Parse error (problem parsing the package)
- "App not installed" error
- Installing an AAB file on a phone
- adb: device "unauthorized"
- adb: device not found
- adb server version mismatch
- Activity class does not exist
- Play: targetSdk level too low
- Play: permissions policy rejection
- Play: 64-bit requirement
- Play: versionCode already used
- ClassNotFound / NoSuchMethod crash
- OutOfMemoryError crash
- CLEARTEXT communication not permitted
- SecurityException: permission denied