diff --git a/Android/app/src/main/java/com/archipelago/app/ui/screens/WebViewScreen.kt b/Android/app/src/main/java/com/archipelago/app/ui/screens/WebViewScreen.kt index a61e96e8..e4f78fd2 100644 --- a/Android/app/src/main/java/com/archipelago/app/ui/screens/WebViewScreen.kt +++ b/Android/app/src/main/java/com/archipelago/app/ui/screens/WebViewScreen.kt @@ -227,13 +227,17 @@ private fun tcpAnswers(base: String, timeoutMs: Int): Boolean = try { } /** Fastest answering origin: LAN inside a short window, else the mesh ULA - * (patient — a cold session may still be establishing), else LAN anyway so - * the existing error/fallback path handles it. */ + * (patient — a cold session may still be establishing). If NEITHER answers, + * fall back to the mesh URL when we have one — off-LAN the LAN IP is + * unreachable, and loading it just produced a confusing "can't reach + * 192.168.x.x" error page (user-reported 2026-07-27). Targeting the mesh URL + * instead means the load retries against the path that's actually coming up, + * and any error shows the mesh address rather than a dead LAN IP. */ private suspend fun pickStartUrl(lanUrl: String, meshUrl: String?): String = withContext(Dispatchers.IO) { if (tcpAnswers(lanUrl, 2500)) return@withContext lanUrl if (meshUrl != null && tcpAnswers(meshUrl, 12_000)) return@withContext meshUrl - lanUrl + meshUrl ?: lanUrl } /** Apply the WebView settings shared by the kiosk view and the in-app browser.