fix(app): server validation hangs indefinitely + stale cache causes false positives on Android
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- mobile-dev
Research direction
Start in packages/happy-app/sources/app/(app)/server.tsx at validateServer() and inspect how the Server Config screen handles its fetch and validating state. Add the specified timeout, cache-control headers, and timer cleanup, then verify that slow or unreachable servers stop validating and cached Android responses are not accepted.
Written by the indexing model from the issue text.
Description
Problem
When validating a server URL in the Server Config screen, two bugs affect Android users:
- Indefinite hang — if the server is unreachable or slow,
fetch()has no timeout, leaving the UI permanently stuck in validating state. - Stale cache — Android WebView can serve a cached
200 OKfrom a previous successful check, causing a dead server to pass validation.
Both issues are reproducible on real Android devices, especially over slow links or when the VPS goes offline.
Root Cause
validateServer() in packages/happy-app/sources/app/(app)/server.tsx uses a bare fetch() with no abort signal and no cache-control headers:
const response = await fetch(url, {
method: 'GET',
headers: { 'Accept': 'text/plain' }
});
Fix
- Wrap in
AbortControllerwith a 10-second timeout - Add
Cache-Control: no-cache+Pragma: no-cacheheaders clearTimeout()infinallyblock to prevent timer leaks
Affected File
packages/happy-app/sources/app/(app)/server.tsx
- Dominant language
- TypeScript
- Stars
- 23.8k
- Forks
- 2k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from slopus/happy
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100