diff --git a/scripts/install-cli.sh b/scripts/install-cli.sh index 494720d43e27..1584ab8363b0 100755 --- a/scripts/install-cli.sh +++ b/scripts/install-cli.sh @@ -625,7 +625,7 @@ install_alpine_node() { installed_version="$("$(node_bin)" -v 2>/dev/null || echo unknown)" required_version="$(required_node_version)" sqlite_version="$(linked_node_sqlite_version)" - fail "Alpine Node package must provide Node >= ${required_version} with WAL-reset-safe SQLite 3.51.3+ (or patched 3.50.7+/3.44.6+); found Node ${installed_version}, SQLite ${sqlite_version}." + fail "Alpine Node package must provide Node >= ${required_version} with WAL-reset-safe SQLite 3.51.3+, 3.50.7+ within 3.50.x, or 3.44.6+ within 3.44.x; found Node ${installed_version}, SQLite ${sqlite_version}." fi installed_version="$("$(node_bin)" -v 2>/dev/null || echo unknown)" diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 743ae786e4be..3cba39b9182f 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -221,7 +221,7 @@ function Check-Node { } else { $sqliteVersion } - Write-Host "[!] Node.js $nodeVersion uses SQLite $sqliteVersionLabel; SQLite 3.51.3+ (or patched 3.50.7+/3.44.6+) is required" -ForegroundColor Yellow + Write-Host "[!] Node.js $nodeVersion uses SQLite $sqliteVersionLabel; SQLite 3.51.3+, 3.50.7+ within 3.50.x, or 3.44.6+ within 3.44.x is required" -ForegroundColor Yellow return $false } else { Write-Host "[!] Node.js $nodeVersion found, but Node 22.22.3+, Node 24.15.0+, or Node 25.9.0+ is required" -ForegroundColor Yellow diff --git a/src/infra/node-sqlite.test.ts b/src/infra/node-sqlite.test.ts index 398edbbdc809..693538e81c87 100644 --- a/src/infra/node-sqlite.test.ts +++ b/src/infra/node-sqlite.test.ts @@ -42,11 +42,11 @@ async function withNodeSharedSqliteValue(value: unknown, run: () => Promise { }, ); - it.each(["3.51.2", "3.51.0", "3.50.6", "3.49.1", "3.44.5", "invalid", "3.51"])( + it.each(["3.51.2", "3.51.0", "3.50.6", "3.49.1", "3.46.1", "3.44.5", "invalid", "3.51"])( "rejects vulnerable or unknown SQLite %s", async (version) => { const { requireNodeSqlite } = await loadNodeSqliteWithVersion(version); diff --git a/src/infra/node-sqlite.ts b/src/infra/node-sqlite.ts index c515f0778469..e77d61e3c71e 100644 --- a/src/infra/node-sqlite.ts +++ b/src/infra/node-sqlite.ts @@ -17,10 +17,10 @@ function assertSqliteWalResetSafeVersion(version: string, nodeVersion: string): variables?.node_shared_sqlite === true || variables?.node_shared_sqlite === "true"; const wording = isShared ? "uses shared system" : "embeds"; const remediation = isShared - ? "Upgrade the system SQLite library to 3.51.3+ (or patched 3.50.7+/3.44.6+), or use a Node build embedding a safe version." + ? "Upgrade the system SQLite library to one of those safe versions, or use a Node build embedding a safe version." : "Upgrade to Node 22.22.3+, 24.15.0+, or 25.9.0+ before retrying."; throw new Error( - `OpenClaw requires SQLite 3.51.3+ (or patched 3.50.7+/3.44.6+) for WAL safety; ` + + `OpenClaw requires SQLite 3.51.3+, 3.50.7+ within 3.50.x, or 3.44.6+ within 3.44.x for WAL safety; ` + `Node ${nodeVersion} ${wording} SQLite ${version}, which is affected by the upstream WAL-reset ` + `database corruption bug. ${remediation}`, ); diff --git a/test/scripts/install-cli.test.ts b/test/scripts/install-cli.test.ts index a84aab2782f1..19d28e27110f 100644 --- a/test/scripts/install-cli.test.ts +++ b/test/scripts/install-cli.test.ts @@ -701,7 +701,7 @@ describe("install-cli.sh", () => { expect(result.status).toBe(1); expect(readFileSync(apkLog, "utf8")).toContain("add --no-cache nodejs npm"); expect(result.stdout).toContain( - "Alpine Node package must provide Node >= 22.22.3 with WAL-reset-safe SQLite", + "Alpine Node package must provide Node >= 22.22.3 with WAL-reset-safe SQLite 3.51.3+, 3.50.7+ within 3.50.x, or 3.44.6+ within 3.44.x", ); expect(result.stdout).toContain("found Node v22.18.0, SQLite unavailable"); } finally { diff --git a/test/scripts/install-ps1.test.ts b/test/scripts/install-ps1.test.ts index a28438f54319..7e4ad26dcb52 100644 --- a/test/scripts/install-ps1.test.ts +++ b/test/scripts/install-ps1.test.ts @@ -134,6 +134,7 @@ describe("install.ps1 failure handling", () => { "$cases = @{", " '3.44.5' = $false", " '3.44.6' = $true", + " '3.46.1' = $false", " '3.50.6' = $false", " '3.50.7' = $true", " '3.51.2' = $false", @@ -503,6 +504,9 @@ describe("install.ps1 failure handling", () => { expect(checkNodeBody).toContain("$sqliteProbe | & $nodePath -"); expect(checkNodeBody).not.toContain("& $nodePath -e"); expect(checkNodeBody).toContain("Test-NodeSqliteSupported -Version $sqliteVersion"); + expect(checkNodeBody).toContain( + "SQLite 3.51.3+, 3.50.7+ within 3.50.x, or 3.44.6+ within 3.44.x is required", + ); expect(source).toContain("Please install Node.js 24.15+ manually:"); });