Skip to content

Document how to connect to a non-default packager port on Android #8252

@mkonicek

Description

@mkonicek

It's possible to start the packager locally on a different than the default port 8081:

react-native start --port 8088

(Try going to localhost:8088 in your browser)

How to get the device to connect to the packager on that port, however?

On iOS, you can change the port in AppDelegate.m.
On Android, the port seems to be hardcoded in AndroidInfoHelpers.java, maybe it's possible to simply pass different arguments to adb reverse tcp:8081 tcp:8081?

A good place to put this info would be the "Running on device" docs, both iOS and Android:

This is quite highly upvoted request on Product Pains:
https://productpains.com/post/react-native/allow-packager-port-to-be-configurable-change-from-8081/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions