Symptom
Daily backup fails on every run with:
[plugins] memory-lancedb-pro: backup failed: TypeError [ERR_INVALID_ARG_TYPE]:
The "path" argument must be of type string or an instance of Buffer or URL.
Received undefined
Gateway runs fine otherwise; only the backup task is broken. No JSONL backup written.
Affected code
index.ts lines 1865–1908 (runBackup closure):
async function runBackup() {
try {
const backupDir = api.resolvePath(
join(resolvedDbPath, "..", "backups"),
);
await mkdir(backupDir, { recursive: true });
...
api.resolvePath is called a second time here — resolvedDbPath is already an absolute path (it was produced by an earlier api.resolvePath(...) at line 217). Under OpenClaw 2026.4.29, the second call returns undefined, which then propagates into mkdir(undefined, ...) → ERR_INVALID_ARG_TYPE.
The bundled memory-lancedb plugin in the gateway only calls api.resolvePath once (on the raw input dbPath) and then uses plain join(...) for derived paths — that one keeps working.
Suggested fix
Either:
// Don't double-resolve; resolvedDbPath is already absolute
const backupDir = join(resolvedDbPath, "..", "backups");
…or, if you want the path coercion behaviour for safety, make it idempotent:
const backupDir = api.resolvePath(join(resolvedDbPath, "..", "backups"))
?? join(resolvedDbPath, "..", "backups");
Environment
- OpenClaw 2026.4.29 (a448042) — gateway running on Termux/Android
- Plugin: memory-lancedb-pro 1.1.0-beta.9
- Node v22.22
Reproduction
- Install plugin in any 2026.4.29 gateway with
embedding: OK, retrieval: OK.
- Wait for the plugin's daily
BACKUP_INTERVAL_MS timer to fire (24h), or manually trigger via the same code path on startup if available.
- Observe
[plugins] memory-lancedb-pro: backup failed: TypeError ERR_INVALID_ARG_TYPE in the gateway log.
I have not been able to test this against earlier OpenClaw versions to confirm whether api.resolvePath's idempotency changed in 2026.4.29 specifically — flagging the symptom first; the maintainer is better placed to confirm the API contract drift.
Symptom
Daily backup fails on every run with:
Gateway runs fine otherwise; only the backup task is broken. No JSONL backup written.
Affected code
index.tslines 1865–1908 (runBackupclosure):api.resolvePathis called a second time here —resolvedDbPathis already an absolute path (it was produced by an earlierapi.resolvePath(...)at line 217). Under OpenClaw 2026.4.29, the second call returnsundefined, which then propagates intomkdir(undefined, ...)→ERR_INVALID_ARG_TYPE.The bundled
memory-lancedbplugin in the gateway only callsapi.resolvePathonce (on the raw input dbPath) and then uses plainjoin(...)for derived paths — that one keeps working.Suggested fix
Either:
…or, if you want the path coercion behaviour for safety, make it idempotent:
Environment
Reproduction
embedding: OK, retrieval: OK.BACKUP_INTERVAL_MStimer to fire (24h), or manually trigger via the same code path on startup if available.[plugins] memory-lancedb-pro: backup failed: TypeError ERR_INVALID_ARG_TYPEin the gateway log.I have not been able to test this against earlier OpenClaw versions to confirm whether
api.resolvePath's idempotency changed in 2026.4.29 specifically — flagging the symptom first; the maintainer is better placed to confirm the API contract drift.