windmill-labs/windmill · error · Error

Dependency generation failed: ${queueResponse.status} ${queu

Error message

Dependency generation failed: ${queueResponse.status} ${queueResponse.statusText}\n${text}

What it means

Raised by generateInlineScriptLock when the async dependency-generation endpoint (`POST /jobs/run/dependencies_async`) responds with a non-2xx status. The response body (text) is included in the message, so the server-side reason (auth failure, invalid path, worker overload, bad payload) is appended after status and statusText.

Source

Thrown at cli/src/commands/app/app_metadata.ts:794

          filteredDeps && Object.keys(filteredDeps).length > 0
            ? filteredDeps
            : null,
        entrypoint: scriptPath,
        ...(tempScriptRefs && Object.keys(tempScriptRefs).length > 0
          ? { temp_script_refs: tempScriptRefs }
          : {}),
      }),
    }
  );

  await detectAuthGatewayChallenge(
    queueResponse,
    `${workspace.remote}api/w/${workspace.workspaceId}/jobs/run/dependencies_async`,
  );

  if (!queueResponse.ok) {
    const text = await queueResponse.text();
    throw new Error(
      `Dependency generation failed: ${queueResponse.status} ${queueResponse.statusText}\n${text}`
    );
  }

  const jobId = (await queueResponse.text()).trim();

  let completion;
  try {
    completion = await pollJobWithQueueLogging(
      workspace.workspaceId,
      jobId,
      { label: `deps ${scriptPath}` },
    );
  } catch (e: any) {
    throw new Error(
      `Failed to poll dependencies job ${jobId}: ${e?.message ?? e}`
    );
  }

View on GitHub (pinned to e474e8803c)

Solutions

  1. Read the appended `text` in the message — it contains the server's error explanation; fix that underlying cause first
  2. Run `wmill workspace switch` / verify the token with `wmill workspace add` to rule out auth (401/403)
  3. Verify workspace.remote URL and workspace id are correct (404) and that the instance is reachable (curl the /api endpoint)
  4. Check that workers are running and can process dependency jobs (402/queue errors), then retry the sync
Defensive patterns

Strategy: retry

Validate before calling

// pre-check reachability and auth before queuing
const wsCheck = await fetch(`${workspace.remote}api/w/${workspace.workspaceId}/workspaces/get`, {
  headers: { Authorization: `Bearer ${workspace.token}` },
});
if (!wsCheck.ok) throw new Error(`Workspace unreachable/auth failed: ${wsCheck.status} — fix before syncing dependencies`);

Try / catch

try {
  await generateInlineScriptLock(workspace, scriptPath, ...);
} catch (e) {
  if (String(e).startsWith('Dependency generation failed:')) {
    console.error('Server rejected the dependencies job; inspect status + body in the message, check auth/workers, then retry.');
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling `wmill app sync`/generate-lock for an inline script whose dependency lock must be generated, and the queued job request fails: 401/403 (bad token), 404 (bad workspace id or path), 402 (no workers / plan limit), 422/500 (malformed script metadata), or 5xx from an overloaded instance.

Common situations: Expired or wrong API token configured for the CLI; targeting the wrong instance URL (workspace.remote) so the endpoint 404s; no worker queue available for dependency jobs; offline/intermittent network producing a gateway error; server version mismatch rejecting the payload.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/ca1a6995d980a7e7. Report an issue: GitHub.