Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix(mobile): ignore unreliable Android internet reachability (#3127)

Mohamed Bassem86a7a8ea9f61
diff --git a/apps/mobile/lib/offlineCache.ts b/apps/mobile/lib/offlineCache.ts
index 8b6c3928..14bce3de 100644
--- a/apps/mobile/lib/offlineCache.ts
+++ b/apps/mobile/lib/offlineCache.ts
@@ -320,7 +320,13 @@ export function setupOnlineManager() {
onlineManager.setEventListener((setOnline) => {
let active = true;
const updateOnlineState = (state: Network.NetworkState) => {
- setOnline(state.isInternetReachable ?? state.isConnected ?? true);
+ // Deliberately ignore isInternetReachable. On Android it requires the
+ // network to pass the OS's own connectivity validation, which VPNs
+ // (e.g. Cloudflare WARP) and LAN-only setups can fail even though the
+ // self-hosted server is reachable. Treating that as offline pauses all
+ // queries and skips the server health check, so the app never recovers.
+ // Whether the server itself is reachable is left to useConnectionStatus.
+ setOnline(state.isConnected ?? true);
};
void Network.getNetworkStateAsync()