Skip to content

HybridApp dev menu "Change bundle location" doesn't affect or persist the Metro server/bundle location #98796

Description

@MelvinBot

Problem

The React Native dev menu's Change bundle location / Configure bundler option does not reliably control where the JS bundle is loaded from in the HybridApp, and the configured Metro server/bundle location is not persisted as expected.

iOS

The iOS HybridApp app delegate hardcodes its debug bundle URL to localhost:8081 on the simulator and <ip.txt host>:8081 on a physical device. This bypasses RCTBundleURLProvider, which owns the host and port saved by React Native's Configure bundler dev-menu action. As a result, changing the bundler host/port in the dev menu has no effect — the app keeps loading from the hardcoded location.

Android

On Android, the previously configured Metro server / bundle location is not persisted across app restarts, so developers have to reconfigure it every time.

Expected behavior

  • Debug builds should resolve the JS bundle through RCTBundleURLProvider, honoring a configured Metro host and port while retaining React Native's existing ip.txt/localhost discovery and bundled main.jsbundle fallback.
  • Release builds should continue loading the bundled main.jsbundle.
  • The configured Metro server/bundle location should persist across app restarts on Android.

Notes

Fix

Addressed by #98794.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions