Use validate flag and verify SE update via build id, not stdout text
All checks were successful
Deploy GSM / deploy (push) Successful in 23s
All checks were successful
Deploy GSM / deploy (push) Successful in 23s
Steam was reaching state 0x6 with BytesToDownload=0, a known stuck-mid-update pattern that resolves when SteamCMD is told to validate. Also stop relying on the "Success!" stdout marker, which is missing in many real successes — compare the buildid in appmanifest before and after instead. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -495,23 +495,28 @@ const updateHandlers = {
|
||||
`-v ${installHostDir}:/appdata/space-engineers/SpaceEngineersDedicated`,
|
||||
`-v ${steamHostDir}:/home/wine/.steam`,
|
||||
`mmmaxwwwell/space-engineers-dedicated-docker-linux:latest`,
|
||||
`-c "runuser -l wine bash -c 'steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /appdata/space-engineers/SpaceEngineersDedicated +login anonymous +app_update ${appId} +quit'"`
|
||||
`-c "runuser -l wine bash -c 'steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /appdata/space-engineers/SpaceEngineersDedicated +login anonymous +app_update ${appId} validate +quit'"`
|
||||
].join(" ");
|
||||
|
||||
const updateResult = await ssh.execCommand(updateCmd, { execOptions: { timeout: 1200000 } }); // 20 min
|
||||
console.log("[Update] SteamCMD output (tail):", updateResult.stdout.slice(-2000));
|
||||
|
||||
const out = updateResult.stdout || "";
|
||||
const success = out.includes("Success! App '298740'") || out.includes("fully installed");
|
||||
if (!success) {
|
||||
const errLine = out.match(/Error![^\n]*/)?.[0] || updateResult.stderr || "Unbekannter Fehler";
|
||||
throw new Error("Update fehlgeschlagen: " + errLine);
|
||||
}
|
||||
|
||||
// New build id
|
||||
// Verify success by re-reading appmanifest: buildid should now match TargetBuildID (or have changed)
|
||||
const newManifest = await ssh.execCommand(`cat ${manifestPath} 2>/dev/null`);
|
||||
const newMatch = (newManifest.stdout || "").match(/"buildid"\s*"([^"]+)"/);
|
||||
const newTargetMatch = (newManifest.stdout || "").match(/"TargetBuildID"\s*"([^"]+)"/);
|
||||
const newBuildId = newMatch ? newMatch[1] : null;
|
||||
const newTargetBuildId = newTargetMatch ? newTargetMatch[1] : null;
|
||||
|
||||
const stillPending = newTargetBuildId && newTargetBuildId !== "0" && newTargetBuildId !== newBuildId;
|
||||
const buildChanged = oldBuildId && newBuildId && oldBuildId !== newBuildId;
|
||||
const out = updateResult.stdout || "";
|
||||
const reportedSuccess = out.includes("Success! App '298740'") || out.includes("fully installed");
|
||||
|
||||
if (!buildChanged && !reportedSuccess && stillPending) {
|
||||
const errLine = out.match(/Error![^\n]*/)?.[0] || updateResult.stderr || "SteamCMD meldet noch ausstehendes Update";
|
||||
throw new Error("Update fehlgeschlagen: " + errLine);
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
|
||||
Reference in New Issue
Block a user