{"record":{"id":"46d8bf54ad9609b0","repo":"windmill-labs/windmill","slug":"failed-to-fetch-schema-for-runnable-runtype-r","errorCode":null,"errorMessage":"Failed to fetch schema for ${runnable.runType} ${runnable.path}: ${err.message}","messagePattern":"Failed to fetch schema for (.+?) (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/commands/app/dev.ts","lineNumber":1739,"sourceCode":"    }\n    try {\n      if (runnable.runType === \"script\") {\n        const script = await wmill.getScriptByPath({\n          workspace: workspaceId,\n          path: runnable.path,\n        });\n        if (script.schema) schemas[runnableId] = script.schema;\n      } else if (runnable.runType === \"flow\") {\n        const flow = await wmill.getFlowByPath({\n          workspace: workspaceId,\n          path: runnable.path,\n        });\n        const flowSchema = (flow as any)?.value?.schema ?? (flow as any)?.schema;\n        if (flowSchema) schemas[runnableId] = flowSchema;\n      }\n      // hubscript schemas are not fetched (no scoped API); falls back to {}\n    } catch (err: any) {\n      log.warn(\n        colors.yellow(\n          `Failed to fetch schema for ${runnable.runType} ${runnable.path}: ${err.message}`,\n        ),\n      );\n    }\n  }\n  return schemas;\n}\n\n/**\n * Convert runnables from file format to API format.\n * File format uses type: \"script\"|\"hubscript\"|\"flow\" for path-based runnables.\n * API format uses type: \"path\" with runType: \"script\"|\"hubscript\"|\"flow\".\n */\nfunction convertRunnablesToApiFormat(runnables: Record<string, any>): void {\n  for (const [runnableId, runnable] of Object.entries(runnables)) {\n    if (\n      runnable?.type === \"script\" ||","sourceCodeStart":1721,"sourceCodeEnd":1757,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/app/dev.ts#L1721-L1757","documentation":"Per-runnable fetch failure in `wmill app dev`: the API call to get the script (getScriptByPath) or flow (getFlowByPath) for a path-based runnable failed — typically the path doesn't exist remotely, permissions are missing, or the connection dropped. The runnable's schema is simply skipped.","triggerScenarios":"The per-runnable schema fetch throws: nonexistent path in the workspace, insufficient permissions, API/network error, or unsupported runType (hubscript is explicitly skipped).","commonSituations":"Typo in a script/flow path in raw_app.yaml; runnable deleted from the workspace; wrong workspace selected; hub-extracted scripts which have no scoped API.","solutions":["Fix the runnable path in raw_app.yaml / app definition","Push the missing script/flow to the workspace (wmill push)","Confirm the correct workspace is active (wmill workspace current)","Note hubscript runnables intentionally fall back to {} — no schema API exists"],"exampleFix":"// before\npath: \"f/admin/myscript\"   // script deleted\n// after\npath: \"u/admin/myscript\"   // existing script path","handlingStrategy":"fallback","validationCode":"const exists = await wmill.getScript(runnable.path).catch(() => null);\nif (!exists) console.warn(`Runnable ${runnable.path} missing in workspace`);","typeGuard":"function isNotFound(e: unknown): boolean {\n  return typeof e === 'object' && e !== null && ('status' in e && (e as any).status === 404);\n}","tryCatchPattern":"try {\n  schemas[runnableId] = await fetchSchema(runnable);\n} catch (err: any) {\n  log.warn(colors.yellow(`Failed to fetch schema for ${runnable.runType} ${runnable.path}: ${err.message}`));\n  schemas[runnableId] = {}; // fallback\n}","preventionTips":["Verify each runnable path exists in the active workspace before dev","Run wmill push after renaming/moving scripts or flows","Remember hubscript has no schema API — expect the {} fallback","Check workspace permissions if 403s appear"],"tags":["cli","schema","api","warning"],"backgroundTag":"schema-fetch-failed","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}