You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On an iOS 26 simulator (iPhone 17 Pro, iOS 26.4 runtime), Fast Refresh / HMR disconnects from Metro within ~20–30 seconds of the app launching, with no visible JS error. The simulator shows the Fast Refresh disconnected. Reload app to reconnect. banner. Reloading briefly reconnects; the socket is dropped again shortly after. Interval to first drop varies from ~20 seconds to a few minutes but reproduces reliably.
The same Metro instance, started once, simultaneously serves an iPhone SE (2nd gen) / iOS 18 simulator and an Android emulator without any disconnections. Only the iOS 26 simulator drops, ruling out anything Mac-side (Metro, Watchman, port conflicts, firewall).
Reproduces on a stock npx @react-native-community/cli init project with zero custom code, native modules, or dev tooling — ruling out any userland cause.
Workaround (deterministic): hardcoding the bundle URL to http://127.0.0.1:8081/... in AppDelegate.bundleURL() (bypassing RCTBundleURLProvider) keeps Fast Refresh stable indefinitely. Reverting to the default provider reproduces the drop within 30 seconds. This strongly suggests the cause is hostname resolution / NSURLSession behavior specific to iOS 26 simulator runtimes.
Steps to reproduce
On macOS with Xcode 26.x and the iOS 26.4 simulator runtime installed.
Create a fresh project:
npx @react-native-community/cli init rnbaseline --version 0.83.1
cd rnbaseline
Start Metro: yarn start
Build and run on iPhone 17 Pro / iOS 26.4 simulator:
yarn ios --simulator="iPhone 17 Pro"
Let the app idle on the default screen.
Within ~20–30 seconds the Fast Refresh disconnected banner appears.
Running the same app on an iPhone SE (2nd gen) / iOS 18 simulator or on an Android emulator in parallel shows no disconnection.
Mitigations tried (none resolved it except the workaround)
No stacktrace — this is a silent WebSocket drop, not a crash.
React DevTools console (client-side)
Cannot connect to Metro.
Try the following to fix the issue:
- Ensure that Metro is running and available on the same network
- Ensure that the Metro URL is correctly set in AppDelegate
URL: localhost:8081
Error: undefined
Metro server output
yarn start --verbose produces no error or warning at the moment the banner appears. The disconnect is silent from the server's perspective.
and falls back to IPv4. One loopback TCP handshake was observed taking Duration: 2.099s — well above the expected sub-10ms for loopback — suggesting Happy Eyeballs contention.
Suspected cause (not fully confirmed)
The dual-stack resolution pattern appears in both "unstable" and "stable (with hardcode)" runs, so IPv4/IPv6 racing alone doesn't fully explain the intermittency. What is consistently true is that bypassing hostname-based resolution by hardcoding 127.0.0.1 stops the disconnect deterministically. The exact mechanism — IPv6 race, resolver caching, or some other iOS 26-specific NSURLSession behavior — needs maintainer investigation.
Suggested mitigation in RN
Either of these should mask the underlying iOS 26 simulator regression:
Default RCTBundleURLProvider to 127.0.0.1 (not the host's resolvable name) when running in an iOS 26+ simulator, or
Have Metro bind to both IPv4 and IPv6 by default so dual-stack resolution doesn't fail half its candidates.
Adjacent issues (context, not duplicates)
#54845 — iPhone 17 Pro / iOS 26.1, different symptom (dev reload crash); closed as invalid.
#56183 — iOS 26 simulator CoreText bug, fixed in 26.4 runtime. Confirms Apple has shipped multiple broken simulator runtimes for iOS 26.
External: iOS 26.4-beta WKWebView reports document WebSocket-to-IP-address connections taking seconds to establish or failing, with 0.0.0.0 as workaround — suggests a shared NSURLSession regression.
Description
On an iOS 26 simulator (iPhone 17 Pro, iOS 26.4 runtime), Fast Refresh / HMR disconnects from Metro within ~20–30 seconds of the app launching, with no visible JS error. The simulator shows the
Fast Refresh disconnected. Reload app to reconnect.banner. Reloading briefly reconnects; the socket is dropped again shortly after. Interval to first drop varies from ~20 seconds to a few minutes but reproduces reliably.The same Metro instance, started once, simultaneously serves an iPhone SE (2nd gen) / iOS 18 simulator and an Android emulator without any disconnections. Only the iOS 26 simulator drops, ruling out anything Mac-side (Metro, Watchman, port conflicts, firewall).
Reproduces on a stock
npx @react-native-community/cli initproject with zero custom code, native modules, or dev tooling — ruling out any userland cause.Workaround (deterministic): hardcoding the bundle URL to
http://127.0.0.1:8081/...inAppDelegate.bundleURL()(bypassingRCTBundleURLProvider) keeps Fast Refresh stable indefinitely. Reverting to the default provider reproduces the drop within 30 seconds. This strongly suggests the cause is hostname resolution / NSURLSession behavior specific to iOS 26 simulator runtimes.Steps to reproduce
yarn startFast Refresh disconnectedbanner appears.Running the same app on an iPhone SE (2nd gen) / iOS 18 simulator or on an Android emulator in parallel shows no disconnection.
Mitigations tried (none resolved it except the workaround)
yarn start --reset-cache— no effectwatchman watch-del-all && watchman shutdown-server— no effectlsof -i :8081— cleanhttp://127.0.0.1:8081/...inAppDelegate.bundleURL()→ FIXES THE ISSUE (deterministic)React Native Version
0.83.1
Affected Platforms
Runtime - iOS
Output of
npx @react-native-community/cli infoStacktrace or Logs
No stacktrace — this is a silent WebSocket drop, not a crash.
React DevTools console (client-side)
Metro server output
yarn start --verboseproduces no error or warning at the moment the banner appears. The disconnect is silent from the server's perspective.iOS 26 simulator network logs (
log stream)Filter used:
log stream --predicate 'process == "rnbaseline" AND subsystem == "com.apple.network"' --info
Every connection to the dev server resolves to both IPv4 and IPv6 endpoints and then runs Happy Eyeballs:
nw_endpoint_resolver_update [C22.1 Hostname#...:8081 in_progress resolver ...] Adding endpoint handler for IPv4#...:8081
nw_endpoint_resolver_update [C22.1 Hostname#...:8081 in_progress resolver ...] Adding endpoint handler for IPv6#...:8081
The IPv6 candidate fails (Metro listens only on IPv4):
nw_socket_handle_socket_event [C6365.1.1:1] Socket received CONNRESET event
nw_socket_handle_socket_event [C6365.1.1:1] Socket SO_ERROR [61: Connection refused]
[C6365.1.1 IPv6#...:8081 failed socket-flow ...] event: flow:failed_connect @0.005s, error Connection refused
and falls back to IPv4. One loopback TCP handshake was observed taking
Duration: 2.099s— well above the expected sub-10ms for loopback — suggesting Happy Eyeballs contention.Suspected cause (not fully confirmed)
The dual-stack resolution pattern appears in both "unstable" and "stable (with hardcode)" runs, so IPv4/IPv6 racing alone doesn't fully explain the intermittency. What is consistently true is that bypassing hostname-based resolution by hardcoding
127.0.0.1stops the disconnect deterministically. The exact mechanism — IPv6 race, resolver caching, or some other iOS 26-specific NSURLSession behavior — needs maintainer investigation.Suggested mitigation in RN
Either of these should mask the underlying iOS 26 simulator regression:
RCTBundleURLProviderto127.0.0.1(not the host's resolvable name) when running in an iOS 26+ simulator, orAdjacent issues (context, not duplicates)
0.0.0.0as workaround — suggests a shared NSURLSession regression.MANDATORY Reproducer
Reproducible on clean 0.83.1 React Native CLI template
Screenshots and Videos
iCloud shared access
Dropover Cloud (valid for 3 months)