windmill-labs/windmill · error · Error

Failed to generate lockfile: ${JSON.stringify(result, null,

Error message

Failed to generate lockfile: ${JSON.stringify(result, null, 2)}

What it means

Thrown by generateInlineScriptLock when the dependencies job finished successfully (success=true) yet its result payload carries no 'lock' field. This is a worker/CLI contract mismatch: the job completed but returned an unexpected result shape — an older worker image that doesn't emit lock data, a partially failed deps step masked as success, or an API/proxy truncating the result. The full JSON result is dumped so the actual shape is visible.

Source

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

      { label: `deps ${scriptPath}` },
    );
  } catch (e: any) {
    throw new Error(
      `Failed to poll dependencies job ${jobId}: ${e?.message ?? e}`
    );
  }

  const result = completion.result as any;
  if (!completion.success) {
    const message =
      result?.error?.message ??
      (typeof result === "string" ? result : JSON.stringify(result, null, 2));
    throw new Error(`Failed to generate lockfile: ${message}`);
  }

  const lock = result?.lock;
  if (lock === undefined) {
    throw new Error(
      `Failed to generate lockfile: ${JSON.stringify(result, null, 2)}`
    );
  }
  return lock ?? "";
}

/**
 * Result of schema inference for a runnable
 */
export interface InferredSchemaResult {
  runnableId: string;
  schema: any;
}

/**
 * Infers schema for a single runnable from its file content.
 * Used by dev server to update schema in memory (for wmill.d.ts generation).
 * Does NOT write to the runnable YAML file - schema is kept in memory only.

View on GitHub (pinned to e474e8803c)

Solutions

  1. Inspect the dumped JSON result: if it contains an error-like field instead of 'lock', address that underlying failure
  2. Update the CLI to match the server version (npm i -g windmill-cli@latest or the matching version) — a 'lock' field missing usually means worker and CLI disagree on the deps job output format
  3. Retry after restarting/upgrading workers if the result JSON looks truncated or empty
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at cli/src/commands/app/app_metadata.ts:824 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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