vscode-react-native icon indicating copy to clipboard operation
vscode-react-native copied to clipboard

Issue: adb reverse tcp:8081 fails – Address already in use (React Native Android)

Open Hibbanur-Rahman opened this issue 3 weeks ago • 1 comments

🐛 Issue: adb reverse tcp:8081 fails – Address already in use (React Native Android) Description

While running the React Native app on a physical Android device, the build and installation complete successfully, but the app fails to connect to the Metro development server due to an adb reverse error.

Command Used npx react-native run-android

Expected Behavior

The app should connect to the Metro server via:

adb reverse tcp:8081 tcp:8081

Actual Behavior

The following error occurs:

adb.exe: error: cannot bind listener: Address already in use warn Failed to connect to development server using "adb reverse"

As a result, the app launches but does not connect to Metro.

Full Error Log (Relevant Part) info Connecting to the development server... adb.exe: error: cannot bind listener: Address already in use warn Failed to connect to development server using "adb reverse": Command failed: C:\Users\hibba\AppData\Local\Android\Sdk\platform-tools\adb -s 44ffd4c20506 reverse tcp:8081 tcp:8081 info Starting the app on "44ffd4c20506"...

Environment

OS: Windows 10

Node.js: v24.11.1

npm: v11.6.2

React Native CLI

Device: Physical Android device

44ffd4c20506 device

Libraries:

@react-native-firebase/app v23.5.0

@react-native-firebase/messaging v23.5.0

@notifee/react-native v9.1.8

Android SDK:

compileSdk: 36

targetSdk: 36

minSdk: 24

What I’ve Tried adb kill-server adb start-server adb devices

✅ Device reconnects correctly, but the issue persists when running the app.

Additional Notes

Build is successful ✅

APK installs successfully ✅

Issue appears to be related to port 8081 already being in use or adb reverse failing to bind on Windows

Happens consistently on a physical device

Questions

Is this a known issue with Windows + adb reverse?

Is there a recommended workaround (manual port forwarding, alternate port, etc.)?

Could Node 24 / npm 11 be contributing to this?

Hibbanur-Rahman avatar Dec 10 '25 10:12 Hibbanur-Rahman

Hi @Hibbanur-Rahman , 1 Is this a known issue with Windows + adb reverse? YES - This is a well-documented issue, particularly common on Windows platforms. Root Causes: Windows Port Management: Windows has stricter port binding policies compared to Linux/macOS Dynamic Port Exclusion: Windows reserves certain port ranges (sometimes including 8081) through Hyper-V or other system services Firewall/Antivirus Interference: Windows Defender and third-party security software can block port binding Hyper-V Port Reservation: When Hyper-V is enabled, it may reserve ports in the ephemeral range, including commonly used development ports.

2 Is there a recommended workaround? Find process using port 8081 netstat -ano | findstr :8081

Kill specific process (replace 12345 with actual PID) taskkill /PID 12345 /F

Or kill all Node.js processes taskkill /IM node.exe /F

Restart ADB adb kill-server adb start-server

3 Could Node 24 / npm 11 be contributing to this? YES - Node 24 may be an indirect contributing factor.
React Native Official Recommendations: Recommended: Node 18 LTS or Node 20 LTS Not Recommended: Node 24 (as of December 2025, Node 24 is very new and React Native ecosystem hasn't fully adapted)

EmmaYuan1015 avatar Dec 11 '25 01:12 EmmaYuan1015