Stirling-Tools/Stirling-PDF · error · Error
Login request timed out. Please check your network connectio
Error message
Login request timed out. Please check your network connection and try again.
What it means
Thrown when the login error message contains 'timeout' or 'timed out'. The request was sent but no response arrived within the deadline — the network is slow, lossy, or the server is overloaded/stalled. Original error preserved as cause; auth resets to unauthenticated.
Source
Thrown at frontend/editor/src/desktop/services/authService.ts:438
);
}
// Server not found or unreachable
else if (
errMsg.includes("connection refused") ||
errMsg.includes("econnrefused")
) {
this.setAuthStatus("unauthenticated", null);
throw new Error(
"Cannot connect to server. Please check the server URL and ensure the server is running.",
{
cause: error,
},
);
}
// Timeout
else if (errMsg.includes("timeout") || errMsg.includes("timed out")) {
this.setAuthStatus("unauthenticated", null);
throw new Error(
"Login request timed out. Please check your network connection and try again.",
{
cause: error,
},
);
}
// DNS failure
else if (
errMsg.includes("getaddrinfo") ||
errMsg.includes("dns") ||
errMsg.includes("not found") ||
errMsg.includes("enotfound")
) {
this.setAuthStatus("unauthenticated", null);
throw new Error(
"Cannot resolve server address. Please check the server URL is correct.",
{ cause: error },
);View on GitHub (pinned to 9ef20dcab8)
Solutions
- Retry the login once (transient network slowness often clears).
- Move to a more stable/faster network connection.
- Check the server's responsiveness directly (curl the /login endpoint) and increase server capacity if it is overloaded.
- If behind a proxy, raise the proxy's upstream read/connect timeouts to exceed Stirling's response time.
Example fix
// before: single attempt, no retry
await authService.login(server, user, pass);
// after: retry once on timeout
try { await authService.login(server, user, pass); }
catch (e) {
if (e instanceof Error && /timed out/i.test(e.message)) {
show('Network slow — retrying…');
await authService.login(server, user, pass);
return;
}
throw e;
} Defensive patterns
Strategy: retry
Validate before calling
// estimate link health before login
if (navigator.onLine === false) { show('You are offline.'); return; } Type guard
function isLoginTimeout(e: unknown): e is Error {
return e instanceof Error && /timed out/i.test(e.message);
} Try / catch
async function loginWithRetry(...args: Parameters<typeof authService.login>) {
try { return await authService.login(...args); }
catch (e) {
if (isLoginTimeout(e)) { show('Network slow — retrying…'); return await authService.login(...args); }
throw e;
}
} Prevention
- Retry once on timeout (transient).
- Show network state so users know retries are happening.
- Keep the password in memory across the retry, not in a log.
When it happens
Trigger: The Rust login invoke's HTTP request exceeds its timeout: server under heavy load, a saturated/high-latency link, a reverse proxy with a short upstream timeout, or packet loss causing TCP retransmits.
Common situations: User on a congested VPN or mobile hotspot; server doing a long blocking operation (e.g. Supabase cold start) that exceeds the client deadline; intermediate proxy/load balancer timing out before Stirling responds.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Sign up failed
- Cannot connect to server. Please check the server URL and en
- Cannot resolve server address. Please check the server URL i
- SSL/TLS certificate error. Server may have an invalid or sel
- Download failed (${response.status})
AI-assisted analysis of Stirling-Tools/Stirling-PDF@9ef20dcab8 (2026-08-13).
Data as JSON: /api/errors/4b0eac863faa38c7.
Report an issue: GitHub.