windmill-labs/windmill · warning

Could not fetch schemas for path-based runnables: ${err.mess

Error message

Could not fetch schemas for path-based runnables: ${err.message}

What it means

Startup-time failure in `wmill app dev`: the initial loadRunnablesFromBackend succeeded but fetchPathRunnableSchemas (which pulls script/flow schemas from the remote workspace for path-based runnables that carry no schema in local YAML) threw. The dev server keeps running; wmill.d.ts regeneration just lacks those schemas.

Source

Thrown at cli/src/commands/app/dev.ts:537

    );
  }

  // In-memory cache of schemas for path-based runnables fetched from the API.
  // Path-based runnables don't carry their schema in the local YAML (the script /
  // flow at the path is the source of truth), so we fetch once at dev start and
  // reuse for every wmill.d.ts regeneration.
  const pathRunnableSchemas: Record<string, any> = {};
  try {
    const initialRunnables = await loadRunnablesFromBackend(
      path.join(process.cwd(), APP_BACKEND_FOLDER),
      defaultTs,
    );
    Object.assign(
      pathRunnableSchemas,
      await fetchPathRunnableSchemas(workspaceId, initialRunnables),
    );
  } catch (err: any) {
    log.warn(
      colors.yellow(
        `Could not fetch schemas for path-based runnables: ${err.message}`,
      ),
    );
  }

  await genRunnablesTs(inferredSchemas, pathRunnableSchemas);

  // Ensure dist directory exists
  const distDir = path.join(process.cwd(), "dist");
  if (!fs.existsSync(distDir)) {
    fs.mkdirSync(distDir);
  }

  // Session recording: the app moves into an iframe of a shell page holding the
  // recorder toolbar, and finished recordings land in the app folder.
  const recordingEnabled = opts.recording ?? false;
  const recordingsDir = path.join(process.cwd(), RECORDINGS_FOLDER);

View on GitHub (pinned to e474e8803c)

Solutions

  1. Re-authenticate: wmill workspace add / wmill switch and verify the token
  2. Check the app's runnable paths exist in the target workspace
  3. Verify network connectivity to the Windmill instance
  4. Retry — the warning is non-fatal and schemas can refresh on next run

Example fix

// before
wmill app dev   # with stale token
// after
wmill workspace add local http://localhost:8000 admin@windmill.dev changeme && wmill app dev
Defensive patterns

Strategy: retry

Validate before calling

const ws = await wmill.getCurrentWorkspace();
if (!ws) throw new Error('No active workspace; run wmill workspace add first');

Type guard

function isHttpError(e: unknown): e is { status?: number; message: string } {
  return typeof e === 'object' && e !== null && 'message' in e;
}

Try / catch

try {
  Object.assign(pathRunnableSchemas, await fetchPathRunnableSchemas(workspaceId, initialRunnables));
} catch (err: any) {
  log.warn(colors.yellow(`Could not fetch schemas: ${err.message}`));
  // app still serves; schemas degrade to {}
}

Prevention

When it happens

Trigger: fetchPathRunnableSchemas(workspaceId, initialRunnables) throws: network failure, invalid/expired workspace credentials, wrong workspaceId, or the referenced paths not existing server-side.

Common situations: CLI not logged in or token expired; pointing at the wrong workspace; offline/VPN issues; app references a script/flow path that was deleted or renamed.

Related errors


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