App requests hang forever in development: The network connection was lost
React NativeConfirmed fix
Expo dev client, Tailscale
Error
The network connection was lostCause
The API base URL pointed at a Tailscale address, but the phone was not on the tailnet. Metro still worked because the dev client used the LAN address, and the fetch wrapper had no timeout, so every call hung until iOS gave up.
Fix
Use the Mac's LAN IP (or put the phone on the tailnet), restart Metro with --clear, and give every fetch a timeout via AbortController.
More React Native errors
- Screen crashes the whole app: Rendered more hooks than during the previous renderRendered more hooks than during the previous render
- Feed shows an error state for every address: ReferenceError before initializationReferenceError: Cannot access 'scoreById' before initialization
- Screen crash: Maximum update depth exceededError: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate.
- Reanimated crash on device: Tried to synchronously call a non-worklet function on the UI thread[Worklets] Tried to synchronously call a non-worklet function `clamp01` on the UI thread.
- Rows wrapped in <Link asChild> collapse to a tiny height