[Due for payment 2026-12-08] [$175] App stays offline after a brief network drop because NO_RADIO never clears
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: 9.5.39-2 Reproducible in staging?: Yes Reproducible in production?: Unknown If this was caught during regression testing, add the test name, ID and link from BrowserStack: N/A Email or phone of affected tester (no customers): N/A Logs: Full timeline from console logs and Onyx export: https://github.com/Expensify/App/issues/104900#issuecomment-7048759003 Expensify/Expensify Issue URL: N/A Issue reported by: @mallenexpensify Slack conversation (hyperlinked to channel name): N/A
Summary
A short network drop (around 10 seconds) sets the NO_RADIO hard stop in NetworkState.ts. Only a NetInfo isConnected=true event clears it. If that event never comes, the app stays offline. API calls that skip the queue (AuthenticatePusher, OpenInitialSettingsPage, GetMissingOnyxMessages) keep returning 200, but every write stays queued. Full investigation: https://github.com/Expensify/App/issues/104900
Action Performed:
- Use the app on Wi-Fi.
- Let the network drop for a few seconds (sleep and wake, change networks, or roam between access points).
- Keep using the app after the network comes back.
Expected Result:
The app goes back online and sends the queued requests.
Actual Result:
"You appear to be offline" stays on screen for 45+ minutes. Writes (comments, read receipts, ReconnectApp) pile up in networkRequestQueue and never send. isLoadingReportData stays true. No api/Ping is sent after the first failure.
Console log from 2026-11-20 (UTC):
- 18:18:59:
Hard stop: INTERNET_UNREACHABLE, thenHard stop: NO_RADIO. - A few seconds later:
AuthenticatePusherreturns 200 and the app logsINTERNET_UNREACHABLE cleared — a successful request proved connectivity.NO_RADIOstays set. - 18:22–18:53: reads keep returning 200. Writes log
Request persisted but not flushing — we are offline. - ~19:07: after a reload, NetInfo reports
isConnected=trueand all 8 queued requests return 200.
Workaround:
Reload the app (Cmd+R / Ctrl+R). No need to clear cache or sign out.
Platforms:
Select the officially supported platforms where the issue was reproduced:
- [ ] Android: App
- [ ] Android: mWeb Chrome
- [ ] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [ ] Windows: Chrome
- [x] MacOS: Chrome / Safari
Also seen on the macOS Desktop app (2026-10-23).
Possible fix
When any request succeeds, clear NO_RADIO or call NetInfo.fetch(), the same way INTERNET_UNREACHABLE is cleared now. Another option is to keep api/Ping running while NO_RADIO is set.
Repro idea (untested)
Make NetInfo report isConnected=false and then never report isConnected=true again. For example, on web, stub the browser online event so it never fires after an offline event. Then check that API reads still succeed while the queue stays paused.
Related
- https://github.com/Expensify/App/issues/104900
- https://github.com/Expensify/App/issues/93966
- https://github.com/Expensify/App/issues/89252
- https://github.com/Expensify/App/issues/105204
Screenshots/Videos
N/A
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022123866020125336006
- Upwork Job ID: 2123866020125336006
- Last Price Increase: 2026-11-20
Issue Owner
Current Issue Owner: @Krishna2323
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Krishna2323 (External)
Job added to Upwork: https://www.upwork.com/jobs/~022123866020125336006
🤖 Web test steps verification results: ⚠️ partial
Online baseline verified on dev NewDot web. Offline recovery and missed-online-event recovery remain unverified because supported controls provide no safe connectivity fault injection.
| Step | Status |
|---|---|
App works onlineInbox loaded and a test message appeared. AddComment, OpenReport, and Ping returned HTTP 200 without reloading.![]() |
✅ |
Brief offline period clears and queued writes send after connectivity returns without reloadUnverified: permitted controls could not toggle connectivity. |
⚠️ |
Recovery when the browser online event is missed but API connectivity returnsUnverified: safe event suppression and independent connectivity fault injection were unavailable. |
⚠️ |
Proposal
What is the root cause of that problem?
Medium confidence: App treats NetInfo’s disconnected state as an indefinite hard stop, but successful API requests do not clear that stop. This explains how reads can succeed while writes remain queued.
Code evidence and incident correlation
- NetInfo’s
isConnected=falsesetshasRadio=false; that alone keeps App offline (NetworkState.ts:366–379). - Successful requests clear reachability/failure state, not
hasRadio. OnceinternetUnreachableclears, later successes return early (NetworkState.ts:44–55). - Reads and side-effect requests bypass the persisted write queue (makeRequest.ts:98–116). Writes persist but refuse to flush while offline (SequentialQueue.ts:899–908).
- NetInfo cancels reachability polling when it believes no connection exists, explaining why Ping does not independently recover this state (internetReachability.ts:44–67).
- Reload resets these in-memory flags (NetworkState.ts:14–19).
This matches the reported client timeline. A separately paused queue can also block writes, but does not explain the explicit offline guards after unpausing.
Limits: Code was inspected at the linked commit, not the reported staging version. The reason NetInfo missed recovery remains unconfirmed; the prolonged loading indicator’s exact update sequence was not independently reproduced.
What changes do you think we should make in order to solve the problem?
Extend successful-request recovery to handle NO_RADIO alone or alongside INTERNET_UNREACHABLE. Restore connectivity state before notifying subscribers, allowing the existing online-transition queue flush to run.
Preserve forced-offline/debug settings and independent queue pauses. Add regression coverage for combined stops, NO_RADIO alone, repeated successes, queued-write flushing, and a genuine subsequent disconnect.
What alternative solutions did you explore? (Optional)
NetInfo.fetch() alone is insufficient: it can return cached state. refresh() resamples browser state, but can still report a stale disconnected heuristic (state.ts:68–107). Recovery must also avoid immediately relatching from repeated stale events.
Likely duplicate: App stays offline after a brief network drop because NO_RADIO never clears contains the same incident timeline. Consolidating the reports would avoid parallel work.
Next Steps for Contributor+ team:
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/107620) to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
view run · no recording available
After a brief network drop (e.g. Wi-Fi reconnection, waking from sleep, or roaming between access points), the app remains stuck offline indefinitely with the "You appear to be offline" banner displayed. Subsequent API reads and side-effect calls (such as In And in Clear Update Update Proposal
Proposal
Please re-state the problem that we are trying to solve in this issue.
AuthenticatePusher, OpenInitialSettingsPage, GetMissingOnyxMessages) succeed with HTTP 200 OK, but all write requests remain paused in SequentialQueue because the NO_RADIO hard stop (hasRadio = false) is never cleared.What is the root cause of that problem?
src/libs/NetworkState.ts:44-55:onRequestSuccess(() => {
if (!internetUnreachable) {
return;
}
Log.info('[NetworkState] INTERNET_UNREACHABLE cleared — a successful request proved connectivity');
clearHardStops();
scheduleJitteredReconnect();
});
clearHardStops (lines 185–190):function clearHardStops() {
internetUnreachable = false;
sustainedFailuresActive = false;
resetFailureCounters();
updateState();
}
state.isConnected === false, which invokes setHasRadio(false) and sets hasRadio = false (logging Hard stop: NO_RADIO — OS reports no network interface).online event (or NetInfo's internal state fails to re-query the OS network interface without a reload).isConnected === false, it suspends reachability polling (api/Ping is never sent).makeRequest.ts, firing onRequestSuccess() in FailureTracker.ts.onRequestSuccess() in NetworkState.ts only checks if (!internetUnreachable) { return; }. Because internetUnreachable is false, it immediately returns!clearHardStops() is called, it only resets internetUnreachable = false and sustainedFailuresActive = false, leaving hasRadio = false.hasRadio remains false, getIsOffline() continuously returns true (!hasRadio || ...), keeping the app permanently locked in offline mode and blocking all queued writes from flushing.What changes do you think we should make in order to solve the problem?
NO_RADIO and all connectivity hard stops when a request succeeds in src/libs/NetworkState.ts:
A successful HTTP response from Expensify's servers irrefutably proves that the device has an active radio interface and server reachability.onRequestSuccess:onRequestSuccess(() => {
// Only run recovery if at least one connectivity hard stop is currently active
if (hasRadio && !internetUnreachable && !sustainedFailuresActive) {
return;
}
if (!hasRadio) {
Log.info('[NetworkState] NO_RADIO cleared — a successful request proved radio connectivity');
}
if (internetUnreachable) {
Log.info('[NetworkState] INTERNET_UNREACHABLE cleared — a successful request proved connectivity');
}
if (sustainedFailuresActive) {
Log.info('[NetworkState] SUSTAINED_FAILURES cleared — a successful request proved connectivity');
}
clearHardStops();
NetInfo.refresh();
scheduleJitteredReconnect();
});
clearHardStops() to restore hasRadio = true:function clearHardStops() {
hasRadio = true;
internetUnreachable = false;
sustainedFailuresActive = false;
resetFailureCounters();
updateState();
}
NetInfo.refresh() synchronizes NetInfo's internal cache with the browser/OS so that subsequent reachability polling and events resume properly.shouldForceOffline and simulatedOffline debug flags are preserved because getIsOffline() evaluates them independently and clearHardStops does not override user debug settings.What alternative solutions did you explore? (Optional)
NetInfo.refresh() or NetInfo.fetch() on timer: Rejected because NetInfo's browser implementation can return cached disconnected state if the browser has not dispatched a native event, and polling introduces unnecessary overhead.api/Ping running while NO_RADIO is set: Rejected because reachability polling is managed internally by @react-native-community/netinfo, which bypasses reachability checks when isConnected === false. Directly reacting to real request successes in NetworkState is deterministic, immediate, and zero-overhead.Test Plan
tests/unit/NetworkStateTest.ts):
hasRadio is set to false via setHasRadio(false) (putting the app offline with NO_RADIO), triggering recordSuccess() in FailureTracker:
hasRadio (hasRadio becomes true).getIsOffline() returns false).NetInfo.refresh() and notifies reconnect listeners.NO_RADIO and INTERNET_UNREACHABLE are set, a single request success clears both hard stops simultaneously and restores connectivity.shouldForceOffline: true maintains offline state even if a request success callback is invoked.
online event.SequentialQueue flush successfully to the server.
Contributor details
Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0105126232377c4c5c
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
This affects many users, not just me. VictoriaLogs, desktop user agents (Mac/Windows, browser or Desktop app), 24h windows:
| Nov 18 | Nov 20 | |
|---|---|---|
| Users stuck (any duration) | 1,578 | 1,352 |
| Stuck > 5 min | 105 | 109 |
| Stuck > 30 min | 31 | 33 |
About 9,100 desktop users hit NO_RADIO per day, so roughly 15% get stuck.
"Stuck" means one log batch shows, in order: Hard stop: NO_RADIO, then INTERNET_UNREACHABLE cleared — a successful request proved connectivity, then writes logging persisted but not flushing — we are offline, with no NO_RADIO cleared in between. The network worked, but writes stayed queued.
Example: a Windows/Edge user woke their computer at 01:20 UTC and was still queuing writes as offline at 14:03, almost 13 hours later.
These counts are low: durations are measured within one log batch, and stuck sessions that end in a reload never upload their logs.
Proposal
Please re-state the problem that we are trying to solve in this issue.
A brief network drop (e.g. sleep/wake or roaming between access points) sets the NO_RADIO hard stop (hasRadio = false) in src/libs/NetworkState.ts. Because only a NetInfo event where isConnected === true can reset hasRadio, if NetInfo fails to emit that event or caches the disconnected state, the app remains permanently stuck offline. Even though non-queued reads (like AuthenticatePusher or OpenInitialSettingsPage) return HTTP 200, all write requests remain queued indefinitely and the "You appear to be offline" banner never clears.
What is the root cause of that problem?
In src/libs/NetworkState.ts:
- In
onRequestSuccess()(lines 44–51):onRequestSuccess(() => { if (!internetUnreachable) { return; } Log.info('[NetworkState] INTERNET_UNREACHABLE cleared — a successful request proved connectivity'); clearHardStops(); scheduleJitteredReconnect(); });onRequestSuccesschecks only!internetUnreachable. IfNO_RADIOis set (hasRadio === false),onRequestSuccessreturns early and does not clearNO_RADIO. - In
clearHardStops():function clearHardStops() { internetUnreachable = false; sustainedFailuresActive = false; resetFailureCounters(); updateState(); }clearHardStops()clearsinternetUnreachableandsustainedFailuresActive, but leaveshasRadiountouched. - Therefore, once
hasRadiois set tofalse, a successful HTTP response (which proves device-level radio and network interface connectivity) cannot restore the app to online state.getIsOffline()continues to returntruebecause!hasRadiois true, blockingSequentialQueuefrom flushing.
What changes do you think we should make in order to solve the problem?
In src/libs/NetworkState.ts:
Update onRequestSuccess so that whenever any request succeeds, it clears hasRadio in addition to internetUnreachable:
onRequestSuccess(() => {
if (!internetUnreachable && hasRadio) {
return;
}
if (!hasRadio) {
Log.info('[NetworkState] NO_RADIO cleared — a successful request proved connectivity');
hasRadio = true;
}
if (internetUnreachable) {
Log.info('[NetworkState] INTERNET_UNREACHABLE cleared — a successful request proved connectivity');
}
clearHardStops();
scheduleJitteredReconnect();
});
This ensures that any successful API call acts as an authoritative source of truth for physical radio connectivity, clearing the NO_RADIO hard stop, restoring getIsOffline() to false, and immediately flushing all persisted queued requests via scheduleJitteredReconnect().
What specific scenarios should we test?
- Simulate a brief network disconnection where
NO_RADIOis triggered (hasRadio = false). - Restore network connectivity without firing a native NetInfo
onlineevent. - Execute any read request (or trigger a ping/reconnect).
- Verify that
NO_RADIOis immediately cleared in the log. - Verify that the "You appear to be offline" banner clears and all queued writes in
SequentialQueueflush successfully. - Verify debug options (
shouldForceOffline,simulatedOffline) still function as intended and are not overridden.
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~017cd1009178a92a66
Proposal
What is the root cause of that problem?
There are two coupled issues in src/libs/NetworkState.ts:
- A successful API response never clears
NO_RADIO(hasRadio = false):onRequestSuccess(lines 44–51) returns early whenever!internetUnreachable, so if onlyNO_RADIOis active it exits without doing anything.- Even when both
NO_RADIOandINTERNET_UNREACHABLEare active,onRequestSuccesscallsclearHardStops()(lines 179–184), which clearsinternetUnreachableandsustainedFailuresActivebut leaveshasRadio = false. That matches the production log timeline (Hard stop: NO_RADIO→INTERNET_UNREACHABLE cleared→ writes still logged aspersisted but not flushing — we are offline).
- Stale NetInfo emissions unconditionally re-set
NO_RADIO:- Unlike
isInternetReachable— which tracksprevIsInternetReachableand only triggerssetInternetUnreachable(true)on anon-false → falsetransition (lines 41–43, 378) so stalefalseevents cannot re-lock the app after recovery — the NetInfo listener invokessetHasRadio(radio)unconditionally on every emission (line 372). - Because of this, even if
onRequestSuccesssetshasRadio = true, any subsequent stale NetInfo emission withisConnected === false(such asNetworkState.refresh()on foreground focus, or callingNetInfo.refresh()during recovery) immediately setshasRadio = falseagain and traps the user back inNO_RADIO.
- Unlike
What changes do you think we should make in order to solve the problem?
In src/libs/NetworkState.ts:
- Clear
NO_RADIOwhen a real request proves connectivity:- Update
onRequestSuccessto recover whenever!hasRadio || internetUnreachable(not onlyinternetUnreachable), logging[NetworkState] NO_RADIO cleared — a successful request proved connectivitywhen!hasRadiowas set. - Move
hasRadio = trueintoclearHardStops()alongsideinternetUnreachable = falseandsustainedFailuresActive = false(matchingonReachabilityRestored()and leaving debug flagsshouldForceOfflineandsimulatedOfflineuntouched). - Do not call
NetInfo.refresh()insideonRequestSuccess, since refreshing while the browser/OS still cachesisConnected === falsewould re-emit a stalefalsestate.
- Update
- Guard
NO_RADIOwith aprevIsConnectedtransition check (mirroringprevIsInternetReachable):- Track
prevIsConnectedinNetworkState.ts. - In the NetInfo listener, only call
setHasRadio(false)whenstate.isConnected === false && prevIsConnected !== false, and callsetHasRadio(true)whenradioistruewhile!hasRadio. - Keep
prevIsConnectedatfalsewhenonRequestSuccessclearshasRadio, so repeated staleisConnected === falseemissions (e.g. from foregroundrefresh()) do not re-triggerNO_RADIO, while once NetInfo observesisConnected === true, any future genuine disconnect (true → false) triggersNO_RADIOnormally.
- Track
- Add unit tests in
tests/unit/NetworkStateTest.tsandtests/unit/NetworkStateReachabilityTest.ts:- Verify
onRequestSuccessclearsNO_RADIO(both standalone and combined withINTERNET_UNREACHABLE) and bringsgetIsOffline()back tofalsewhile scheduling reconnect. - Verify repeated stale
isConnected === falseemissions (e.g. viarefresh()) do not re-enterNO_RADIOafter recovery, while a subsequenttrue → falsetransition still setsNO_RADIO. - Verify
shouldForceOfflineandsimulatedOfflineremain unaffected.
- Verify
What alternative solutions did you explore? (Optional)
- Calling
NetInfo.refresh()insideonRequestSuccess: Rejected because on desktop web/Electron wherenavigator.onLineor NetInfo's cached state staysfalse, refreshing immediately re-emitsisConnected === falseand without a transition guard puts the app right back intoNO_RADIO. - Ignoring
state.isConnectedentirely on web/desktop: Rejected becauseNO_RADIOis still useful as a fast-fail signal on a realtrue → falsenetwork drop; it only needs to yield to proven HTTP connectivity and ignore repeated stalefalseemissions.
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
I will pick that up as I wrote these mechanisms myself, looking into it today
I think I'm onto something and for now everything points me to https://github.com/react-native-netinfo/react-native-netinfo/issues/756 which is upstream. I will run more manual validations and summarize here by EOW.
I was able to reproduce the stuck state I believe, opening up PRs we can ship adhocs for you to try @mallenexpensify.
@mallenexpensify most importantly I think you should try an adhoc from https://github.com/Expensify/App/pull/108127. I was able to get stuck 5/8 times on its reproduction steps locally, running on Chrome 158 in MacOS without this patch. It's 1:1 the upstream fix and I believe its the correct approach to getting this race condition fixed.
The other bit is https://github.com/Expensify/App/pull/108128 which I think is the other correctness fix to our own code, where we should treat any network success (any READ) as a confirmation of the network being on, no matter what the library says.
Both these should only yield more correct network status resolution, but we should test and deploy them separately.
@Krishna2323
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.55-6 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/108127
If no regressions arise, payment will be issued on 2026-12-08. :confetti_ball:
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]