Repository navigation
Fall back to a cached engine manifest when the CDN is unreachable - #342
Closed
RavenAzala wants to merge 1 commit into
Closed
RavenAzala wants to merge 1 commit into
RavenAzala wants to merge 1 commit into
Conversation
Engine version resolution requires the Robust builds manifest from robust-builds.cdn.spacestation14.com. When that CDN is unreachable (e.g. blocked network regions such as Russia, see space-wizards#274), connecting to any server fails with "Unable to find engine version in manifest", even if the requested engine version is already installed locally. Persist the manifest (and engine module manifest) JSON to disk and fall back to that copy when downloading it fails. User cancellation is still propagated, and cache read/write errors never break the connection flow.
Member
|
As per our guidelines, we do not accept pull requests made with LLMs. Caching manifests also poses a security risk, and is not a solution we can accept. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #341.
Problem
Connecting to a server requires resolving the server's engine version via the Robust builds manifest (
manifest.json, hosted onrobust-builds.cdn.spacestation14.com). If the CDN is unreachable (e.g. #274 — blocked by ISP-level filtering in Russia), this fails even when the engine version the server wants is already installed on the player's machine: the manifest is resolved before the "is this engine installed?" check inDownloadEngineIfNecessary, so a dead CDN bricks connecting to every server for affected players.Changes
manifest.jsonandmodules.jsonto the launcher's local data dir (engine_build_manifest.json/engine_module_manifest.json) after each successful download. The raw JSON is persisted so the fallback copy is byte-identical to what was fetched.UrlFallbackSetURLs unreachable), fall back to the persisted copy, if any.OperationCanceledExceptionwith the token actually cancelled) is still propagated; the fallback only triggers on genuine network failures.File.Moveoverwrite) so a crash mid-write can't corrupt the cache.JsonSerializerOptions(JsonSerializerDefaults.Web), matching whatGetFromJsonAsyncused before, so wire-format handling is unchanged.Limitations
Notes
286.0.0->286.0.3resolve via the fallback.Related: #274 (CDN blocked from Russia), #182 (slow CDN downloads).