fix(android): stop rewriting localhost to 10.0.2.2#1380
fix(android): stop rewriting localhost to 10.0.2.2#1380MikitasK wants to merge 3 commits intocallstack:mainfrom
Conversation
🦋 Changeset detectedLatest commit: a72b21f The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@MikitasK is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
|
What a find! Nice job! |
|
@MikitasK can you please add a changeset 🙏 |
|
@MikitasK could you double check on emulator that it doesn't break. Like if you fully create a fresh build etc just to make sure |
sure thing @dannyhw 👌 double-checking these changes before merge makes a lot of sense Screen.Recording.2026-04-22.at.20.06.21.mp4the behavior is pretty much the same - it works as expected ☑️ |
Summary
Issue #1247
Fix Android physical-device dev server resolution by removing the unconditional runtime rewrite from
localhostto10.0.2.2Previously, re.pack treated every Android runtime like an emulator. That caused:
ws://10.0.2.2:8081/__hmrhttp://10.0.2.2:8081/...It works on emulators, but breaks on physical devices, where
10.0.2.2is unreachableThis change makes re.pack use the configured dev-server host literally, which allows Android physical devices to work correctly with the standard
localhost+adb reverseflowTest Plan
apps/tester-appwith the default host bypnpm react-native webpack-startadb reverse tcp:8081 tcp:8081apps/tester-app/src/App.tsx& saveRecordiing
Screen.Recording.2026-04-16.at.19.01.41.mp4