windmill-labs/windmill · warning
Failed to fetch schema for ${runnable.runType} ${runnable.pa
Error message
Failed to fetch schema for ${runnable.runType} ${runnable.path}: ${err.message} What it means
Per-runnable fetch failure in `wmill app dev`: the API call to get the script (getScriptByPath) or flow (getFlowByPath) for a path-based runnable failed — typically the path doesn't exist remotely, permissions are missing, or the connection dropped. The runnable's schema is simply skipped.
Source
Thrown at cli/src/commands/app/dev.ts:1739
}
try {
if (runnable.runType === "script") {
const script = await wmill.getScriptByPath({
workspace: workspaceId,
path: runnable.path,
});
if (script.schema) schemas[runnableId] = script.schema;
} else if (runnable.runType === "flow") {
const flow = await wmill.getFlowByPath({
workspace: workspaceId,
path: runnable.path,
});
const flowSchema = (flow as any)?.value?.schema ?? (flow as any)?.schema;
if (flowSchema) schemas[runnableId] = flowSchema;
}
// hubscript schemas are not fetched (no scoped API); falls back to {}
} catch (err: any) {
log.warn(
colors.yellow(
`Failed to fetch schema for ${runnable.runType} ${runnable.path}: ${err.message}`,
),
);
}
}
return schemas;
}
/**
* Convert runnables from file format to API format.
* File format uses type: "script"|"hubscript"|"flow" for path-based runnables.
* API format uses type: "path" with runType: "script"|"hubscript"|"flow".
*/
function convertRunnablesToApiFormat(runnables: Record<string, any>): void {
for (const [runnableId, runnable] of Object.entries(runnables)) {
if (
runnable?.type === "script" ||View on GitHub (pinned to e474e8803c)
Solutions
- Fix the runnable path in raw_app.yaml / app definition
- Push the missing script/flow to the workspace (wmill push)
- Confirm the correct workspace is active (wmill workspace current)
- Note hubscript runnables intentionally fall back to {} — no schema API exists
Example fix
// before path: "f/admin/myscript" // script deleted // after path: "u/admin/myscript" // existing script path
Defensive patterns
Strategy: fallback
Validate before calling
const exists = await wmill.getScript(runnable.path).catch(() => null);
if (!exists) console.warn(`Runnable ${runnable.path} missing in workspace`); Type guard
function isNotFound(e: unknown): boolean {
return typeof e === 'object' && e !== null && ('status' in e && (e as any).status === 404);
} Try / catch
try {
schemas[runnableId] = await fetchSchema(runnable);
} catch (err: any) {
log.warn(colors.yellow(`Failed to fetch schema for ${runnable.runType} ${runnable.path}: ${err.message}`));
schemas[runnableId] = {}; // fallback
} Prevention
- Verify each runnable path exists in the active workspace before dev
- Run wmill push after renaming/moving scripts or flows
- Remember hubscript has no schema API — expect the {} fallback
- Check workspace permissions if 403s appear
When it happens
Trigger: The per-runnable schema fetch throws: nonexistent path in the workspace, insufficient permissions, API/network error, or unsupported runType (hubscript is explicitly skipped).
Common situations: Typo in a script/flow path in raw_app.yaml; runnable deleted from the workspace; wrong workspace selected; hub-extracted scripts which have no scoped API.
Related errors
- Could not seed inline schemas at startup: ${err.message}
- Could not fetch datatable schemas: ${errorMessage}
- Failed to re-run job ${id}.
- Failed to push completed jobs: ${e}
- ${errorMessage}
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/46d8bf54ad9609b0.
Report an issue: GitHub.