fix(home): say why git.magicbean.dev was not reached #75

Merged
HumanBean merged 1 commit from llun/LongshotLauncher:fix/say-why-unreachable into main 2026-11-15 03:06:45 +00:00
Member

Players can't reach git.magicbean.dev from the launcher, and it doesn't say why: the update check threw the network error away, so the window could only say "git.magicbean.dev did not answer" or "Could not reach git.magicbean.dev". Now it says what failed and what to check, so a player can fix it or tell us the cause.

What changed

  • Core/NetFailure.cs (new) turns a failed request into a plain reason and what to check:

    • no address: DNS, a VPN or a filter
    • refused / cut / no route: the server is down, a firewall, offline
    • secure connection failed: the PC's date and time, an antivirus or network that inspects HTTPS
    • the proxy didn't answer: the PC's proxy, named (the system's or HTTPS_PROXY), so a dead proxy isn't blamed on the server
    • timeout
    • HTTP 429, 403 or 5xx, each said in plain words

    .NET's own words follow in brackets (e.g. "No such host is known") for whoever helps the player.

  • Core/Fetcher.cs: HttpFetcher puts that reason in the FetchException, so a failed download says it too. It names the host it tried (git-cdn or git.magicbean.dev) instead of always git.magicbean.dev.

  • Core/Releases.cs: the check keeps the reason (Releases.Unreachable), and each check clears the last check's Problem and Unreachable, so an old reason doesn't stay up. VersionAsync's "has no release, or did not answer" adds the reason too.

  • Home: the reason shows under "did not answer… Try again" on the first-start screen and in the update line under the versions list (now wrapped, no longer one cut-off line).

  • An empty channel isn't "did not answer": when the server answered but the build channel has no version yet (there is no stable Longshot release today), it says "No version is out on the Stable channel yet." with Change beside Try again.

  • Translations: the 16 new texts are in all 12 full catalogs, and es-419 has its own where it differs from es (scripts/translations.py: 537 texts, 15 catalogs, all complete).

Screenshots (Debug build, fresh home, HTTPS_PROXY set to a dead proxy; then online with the empty Stable channel)

launcher-proxy.png

launcher-footer.png

launcher-online.png

Testing

  • python -I tests/test_launcher_core.py: 1011 checks passed on Windows 11, .NET SDK 10.0.404. New checks: each kind of failure gives its reason and the innermost words; a refused connection through a proxy blames the proxy; the HTTP codes; a failed list sets Releases.Unreachable and the next answered check clears it.
  • dotnet build LongshotLauncher.slnx: 0 warnings, 0 errors.
  • python -I tests/test_release.py: 1 failure and 10 errors here, the same on main (this PC has no openssl command line). This PR doesn't touch scripts/release.py.
  • Run in the launcher (Debug build, a fresh LONGSHOT_LAUNCHER_HOME, Windows 11):
    • with HTTPS_PROXY=http://127.0.0.1:9 (a dead proxy), on the first-start screen and with a version in the list: screenshots below;
    • online: the server answered, the Stable channel is empty, and the new line shows (a dev build follows Stable; a release-candidate launcher follows rc and finds v3.0.0-rc.3 as before).
  • Not run in the launcher: a real DNS failure, a TLS failure, a refused connection without a proxy. Those come from the checks above, which build the same exceptions .NET throws.

Risks

Only messages change. What the launcher fetches, retries and trusts is unchanged; the CDN fallback still goes by the status code alone. Strings made at fetch time are in the language in use at that moment, as before.

🤖 Generated with Claude Code

Players can't reach git.magicbean.dev from the launcher, and it doesn't say why: the update check threw the network error away, so the window could only say "git.magicbean.dev did not answer" or "Could not reach git.magicbean.dev". Now it says what failed and what to check, so a player can fix it or tell us the cause. **What changed** - `Core/NetFailure.cs` (new) turns a failed request into a plain reason and what to check: - **no address**: DNS, a VPN or a filter - **refused / cut / no route**: the server is down, a firewall, offline - **secure connection failed**: the PC's date and time, an antivirus or network that inspects HTTPS - **the proxy didn't answer**: the PC's proxy, named (the system's or `HTTPS_PROXY`), so a dead proxy isn't blamed on the server - **timeout** - **HTTP 429, 403 or 5xx**, each said in plain words .NET's own words follow in brackets (e.g. "No such host is known") for whoever helps the player. - `Core/Fetcher.cs`: `HttpFetcher` puts that reason in the `FetchException`, so a failed download says it too. It names the host it tried (git-cdn or git.magicbean.dev) instead of always git.magicbean.dev. - `Core/Releases.cs`: the check keeps the reason (`Releases.Unreachable`), and each check clears the last check's `Problem` and `Unreachable`, so an old reason doesn't stay up. `VersionAsync`'s "has no release, or did not answer" adds the reason too. - **Home**: the reason shows under "did not answer… Try again" on the first-start screen and in the update line under the versions list (now wrapped, no longer one cut-off line). - **An empty channel isn't "did not answer"**: when the server answered but the build channel has no version yet (there is no stable Longshot release today), it says "No version is out on the Stable channel yet." with **Change** beside **Try again**. - **Translations**: the 16 new texts are in all 12 full catalogs, and es-419 has its own where it differs from es (`scripts/translations.py`: 537 texts, 15 catalogs, all complete). **Screenshots** (Debug build, fresh home, `HTTPS_PROXY` set to a dead proxy; then online with the empty Stable channel) ![launcher-proxy.png](https://git.magicbean.dev/attachments/72c21a12-a337-4aa0-b1eb-6eb2728e5c42) ![launcher-footer.png](https://git.magicbean.dev/attachments/bea5ac7d-e3c6-4c1e-b201-3091a3bc6b8a) ![launcher-online.png](https://git.magicbean.dev/attachments/cf55fbfd-8756-4dd7-a5f2-12316ef88cf6) **Testing** - `python -I tests/test_launcher_core.py`: **1011 checks passed** on Windows 11, .NET SDK 10.0.404. New checks: each kind of failure gives its reason and the innermost words; a refused connection through a proxy blames the proxy; the HTTP codes; a failed list sets `Releases.Unreachable` and the next answered check clears it. - `dotnet build LongshotLauncher.slnx`: 0 warnings, 0 errors. - `python -I tests/test_release.py`: 1 failure and 10 errors here, the **same on `main`** (this PC has no `openssl` command line). This PR doesn't touch `scripts/release.py`. - **Run in the launcher** (Debug build, a fresh `LONGSHOT_LAUNCHER_HOME`, Windows 11): - with `HTTPS_PROXY=http://127.0.0.1:9` (a dead proxy), on the first-start screen and with a version in the list: screenshots below; - online: the server answered, the Stable channel is empty, and the new line shows (a dev build follows Stable; a release-candidate launcher follows rc and finds v3.0.0-rc.3 as before). - **Not run in the launcher**: a real DNS failure, a TLS failure, a refused connection without a proxy. Those come from the checks above, which build the same exceptions .NET throws. **Risks** Only messages change. What the launcher fetches, retries and trusts is unchanged; the CDN fallback still goes by the status code alone. Strings made at fetch time are in the language in use at that moment, as before. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(home): say why git.magicbean.dev was not reached
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
02d3a8b18b
The update check swallowed the network error, so the window said only
that git.magicbean.dev "did not answer". Now the reason reaches it, in
words a player can act on: no address (DNS), a refused or cut
connection, no route, a failed secure connection (the clock, HTTPS
inspection), a proxy that did not answer, a timeout, or the HTTP error
(429, 403, 5xx), with .NET's own words in brackets for whoever helps.
It shows under "did not answer" on the first start and in the update
line under the versions; a download's failure carries the same words.

A channel with no version yet (no stable is out) said "did not answer"
too: it now says so, with Change beside Try again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
llun scheduled this pull request to auto merge when all checks succeed 2026-11-15 02:36:36 +00:00
llun scheduled this pull request to auto merge when all checks succeed 2026-11-15 02:36:58 +00:00
llun canceled auto merging this pull request when all checks succeed 2026-11-15 02:37:14 +00:00
llun scheduled this pull request to auto merge when all checks succeed 2026-11-15 02:37:30 +00:00
HumanBean deleted branch fix/say-why-unreachable 2026-11-15 03:06:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!75
No description provided.