windmill-labs/windmill · warning
Could not fetch schema to validate args: ${e.message}
Error message
Could not fetch schema to validate args: ${e.message} What it means
In `wmill flow run`, the CLI fetches the flow's schema from the workspace to validate that all required args are supplied. If that schema fetch/validation fails for any reason other than a genuine 'Missing required' error, it warns and proceeds to run the flow without arg validation.
Source
Thrown at cli/src/commands/flow/flow.ts:443
if (opts.silent) {
log.setSilent(true);
}
const workspace = await resolveWorkspace(opts);
await requireLogin(opts);
const input = opts.data ? await resolve(opts.data) : {};
// Validate required args against schema when no data provided
if (!opts.data) {
try {
const flow = await wmill.getFlowByPath({
workspace: workspace.workspaceId,
path,
});
validateRequiredArgs(flow.schema as Record<string, unknown>);
} catch (e: any) {
if (e.message?.startsWith("Missing required")) throw e;
log.warn(`Could not fetch schema to validate args: ${e.message}`);
}
}
const id = await wmill.runFlowByPath({
workspace: workspace.workspaceId,
path,
tag: opts.tag,
requestBody: input,
});
// Build step label map from raw_flow if available
const stepLabels = new Map<string, string>();
try {
const initialJob = await wmill.getJob({
workspace: workspace.workspaceId,
id,
});
const rawFlow = (initialJob as any).raw_flow;View on GitHub (pinned to e474e8803c)
Solutions
- Check backend reachability and credentials: `wmill workspace show` and a simple `wmill flow list`.
- Verify the flow path exists in the workspace and is spelled correctly.
- Provide all required args explicitly with `-e/--extra-args` or a value file so validation failure does not matter.
- Re-authenticate: `wmill login` to refresh the token.
Example fix
// before: relies on server-side schema, fails silently offline
wmill flow run u/company/etl
// after: supply args explicitly so the run is correct even without validation
wmill flow run u/company/etl --extra-args '{"date":"2026-09-03"}' Defensive patterns
Strategy: try-catch
Validate before calling
// preflight: confirm the flow is fetchable before relying on schema validation
try { await wmill.getFlowByPath(path); console.log('flow reachable'); }
catch (e) { console.error('backend/path unreachable:', e.message); } Type guard
null
Try / catch
try {
await wmill.runFlowByPath({ workspace, path, args });
} catch (e: any) {
if (/Could not fetch schema|ECONNREFUSED|401|404/.test(e.message ?? '')) {
// check `wmill workspace show`, then retry with explicit --extra-args
}
throw e;
} Prevention
- Verify workspace connectivity (`wmill workspace show`) before scripted runs.
- Always pass required args via `--extra-args` instead of relying on schema validation.
- Keep tokens fresh; re-run `wmill login` after long sessions.
When it happens
Trigger: Running `wmill flow run <path>` when the schema fetch fails: offline/unreachable backend, invalid or expired credentials, flow path not found, or a transient network error during `wmill.getFlowByPath`.
Common situations: VPN/proxy down or flaky network; workspace token expired; typos in the flow path so the schema 404s; backend temporarily unavailable in self-hosted setups; the flow was deleted after the command line was composed.
Related errors
- Dependency generation failed: ${queueResponse.status} ${queu
- Failed to poll dependencies job ${jobId}: ${e?.message ?? e}
- No response body for SSE stream
- Failed to poll flow dependencies job ${jobId}: ${e?.message
- Couldn't fetch resource types from hub ${hubBaseUrl}: ${(awa
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/975bae09b2b614df.
Report an issue: GitHub.