windmill-labs/windmill · error · Error
Failed to push queued jobs: ${e}
Error message
Failed to push queued jobs: ${e} What it means
Generic wrapper error thrown by pushJobs when reading or importing the queued-jobs file fails for any reason other than a missing file (ENOENT, which is treated as 'nothing to push'). It rethrows the original error message embedded in `Failed to push queued jobs: ${e}`, so the underlying cause (parse error, permission error, API failure) is visible in the message text.
Source
Thrown at cli/src/commands/jobs/jobs.ts:241
const queuedJobs = JSON.parse(queuedContent);
if (!Array.isArray(queuedJobs)) {
throw new Error("Queued jobs file must contain an array of jobs");
}
const queuedResult = await wmill.importQueuedJobs({
workspace: ws.workspaceId,
requestBody: queuedJobs,
});
log.info(colors.green(`Queued jobs: ${queuedResult}`));
} catch (e: any) {
if (e.code === "ENOENT") {
log.info(
colors.yellow(`No queued jobs file found at ${queuedPath}, skipping`)
);
} else {
throw new Error(`Failed to push queued jobs: ${e}`);
}
}
}
const pull = new Command()
.description("Pull completed and queued jobs from workspace")
.option(
"-c, --completed-output <file:string>",
"Completed jobs output file (default: completed_jobs.json)"
)
.option(
"-q, --queued-output <file:string>",
"Queued jobs output file (default: queued_jobs.json)"
)
.option(
"--skip-worker-check",
"Skip checking for active workers before export"
)View on GitHub (pinned to e474e8803c)
Solutions
- Read the full message after the colon to identify the underlying cause (SyntaxError vs EACCES vs HTTP status).
- If it is a JSON parse error, validate the file with `jq . queued_jobs.json` and fix the syntax.
- If it is EACCES/EPERM, fix file permissions or run from a directory where queued_jobs.json is readable.
- If it is an HTTP error, check `wmill auth login` / WMILL_TOKEN validity and that the target workspace exists.
Example fix
// before: malformed file
[{"path": "f/a"},]
// after: valid JSON array
[{"path": "f/a"}] Defensive patterns
Strategy: try-catch
Validate before calling
const content = await readTextFile(queuedPath).catch(() => null); if (content !== null) JSON.parse(content); // throws early with a precise SyntaxError
Try / catch
try {
await pushJobs(opts);
} catch (e: any) {
const cause = String(e.message).replace("Failed to push queued jobs: ", "");
if (/JSON/i.test(cause)) console.error("Fix JSON syntax in queued file:", cause);
else if (/EACCES|EPERM/.test(cause)) console.error("Check file permissions:", cause);
else if (/401|403/.test(cause)) console.error("Re-authenticate with `wmill auth login`");
throw e;
} Prevention
- Pre-validate the queued file with `jq . queued_jobs.json` before running push.
- Keep an active login (`wmill auth login`) and confirm the workspace with `wmill workspace show`.
- Check the text after the colon in the message — it carries the real root cause.
When it happens
Trigger: Running `wmill job push` when the queued file contains malformed JSON (JSON.parse throws SyntaxError), the file is not readable (EACCES), or `wmill.importQueuedJobs` rejects due to an HTTP/auth/API error.
Common situations: A truncated or hand-edited queued_jobs.json with a trailing comma or stray characters; a symlink to a file the current user cannot read; an expired or missing WMILL_TOKEN so the import API call returns 401/403; a workspace id that does not exist.
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/bfb4a11f11a3c4d8.
Report an issue: GitHub.