windmill-labs/windmill · warning
Failed to upload scripts to temp storage (backend may be too
Error message
Failed to upload scripts to temp storage (backend may be too old): ${e}. Locks will be generated using deployed script versions only — locally modified relative imports may not be reflected. What it means
`generateMetadata` uploads scripts to temp storage so the backend can resolve relative imports when generating locks. If the upload fails (classically because the backend lacks the `/raw_temp` endpoints), it warns and continues, generating locks from deployed script content only — locally modified relative imports will not be reflected.
Source
Thrown at cli/src/commands/generate-metadata/generate-metadata.ts:563
workspace,
opts,
false,
true, // noStaleMessage
tree
);
}
}
// === Propagate staleness through imports ===
tree.propagateStaleness();
// Upload stale scripts to temp storage so the backend can resolve relative imports.
// If this fails (e.g. backend is older and doesn't have /raw_temp endpoints),
// degrade gracefully: locks will be generated using deployed script content only.
try {
await uploadScripts(tree, workspace);
} catch (e) {
log.warn(colors.yellow(
`Failed to upload scripts to temp storage (backend may be too old): ${e}. ` +
`Locks will be generated using deployed script versions only — locally modified ` +
`relative imports may not be reflected.`
));
}
// === Populate staleItems from tree ===
const staleItems: StaleItem[] = [];
const seenFolders = new Set<string>();
for (const p of tree.allPaths()) {
const staleReason = tree.getStaleReason(p);
if (!staleReason) continue;
const itemType = tree.getItemType(p)!;
const itemFolder = tree.getFolder(p)!;
if (itemType === "dependencies") {View on GitHub (pinned to e474e8803c)
Solutions
- Upgrade the Windmill backend so `/raw_temp` upload endpoints exist.
- Push locally modified imported scripts first (`wmill sync push`) so deployed content already matches.
- Verify connectivity/credentials with `wmill workspace show`, then rerun `wmill generate-metadata`.
- Accept the degraded output only if your imports are unchanged locally.
Example fix
// before: locks generated from deployed imports, local edits lost wmill generate-metadata // after: ensure local edits are in the workspace first wmill sync push && wmill generate-metadata
Defensive patterns
Strategy: fallback
Validate before calling
// ensure deployed content matches local before generating metadata
const res = await fetch(`${baseUrl}/api/w/${workspaceId}/scripts/raw_script_temp`, { method: 'HEAD', headers: { Authorization: token } });
if (res.status === 404) { await wmill.syncPush(); } // old backend: sync instead of temp-upload Type guard
null
Try / catch
try {
await wmill.generateMetadata({});
} catch (e: any) {
if (/temp storage|backend may be too old/.test(e.message ?? '')) {
await wmill.syncPush();
await wmill.generateMetadata({});
} else { throw e; }
} Prevention
- Upgrade the backend to support `/raw_temp` endpoints.
- Run `wmill sync push` before generating metadata when local imports were edited.
- Diff generated locks after generation to confirm local imports were honored.
When it happens
Trigger: Running `wmill generate-metadata` (or flow lock regeneration) on a project with scripts that have local relative-import modifications when `uploadScripts` throws: old backend without `/raw_temp`, network error, or auth failure.
Common situations: Outdated self-hosted backend; offline development; CI runner with restricted network access; token revoked mid-run.
Related errors
- Failed to resolve local relative imports for preview: ${msg}
- App ${appPath} not found
- Dependency generation failed: ${queueResponse.status} ${queu
- Failed to poll dependencies job ${jobId}: ${e?.message ?? e}
- No response body for SSE stream
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/466fde866e079159.
Report an issue: GitHub.