windmill-labs/windmill · error
Job was expected to validate the arguments schema, but no sc
Error message
Job was expected to validate the arguments schema, but no schema was provided and couldn't be inferred from the script for language `{language:?}`. Try removing schema validation for this job What it means
A job was submitted with `validate_job_arguments` (schema validation) enabled, and the schema was not provided explicitly. The worker falls back to inferring the schema from the script's main-function signature (`schema_validator_from_main_arg_sig`), but only certain languages expose such a signature. When the language is one that cannot be inferred (or the signature extraction fails), the worker refuses to run the job with this error rather than silently skipping validation.
Source
Thrown at backend/windmill-worker/src/worker.rs:5165
if let Some(args) = job.args.as_ref() {
if let Some(sv) = schema_validator {
sv.validate(args)?;
} else {
let validators_cache = cache::anon!({ (u8, ScriptHash) => Arc<Option<SchemaValidator>> } in "schemavalidators" <= 1000);
let sv_fut = async move {
if language.map(|l| should_validate_schema(code, l)).unwrap_or(false) {
if let Some(schema) = schema {
Ok(Some(SchemaValidator::from_schema(schema)?))
} else {
if let Some(sig) = parse_sig_of_lang(
code,
language,
job.script_entrypoint_override.clone(),
)? {
Ok(Some(schema_validator_from_main_arg_sig(&sig)))
} else {
Err(anyhow!("Job was expected to validate the arguments schema, but no schema was provided and couldn't be inferred from the script for language `{language:?}`. Try removing schema validation for this job").into())
}
}
} else { Ok(None) }
}
.map_ok(Arc::new);
let sub_key: u8 = match job.kind {
JobKind::Script => 0,
JobKind::FlowScript => 1,
JobKind::AppScript => 2,
JobKind::Script_Hub => 3,
JobKind::Preview => 4,
JobKind::DeploymentCallback => 5,
JobKind::SingleStepFlow => 6,
JobKind::Dependencies => 7,
JobKind::Flow => 8,
JobKind::FlowPreview => 9,
JobKind::Identity => 10,View on GitHub (pinned to e474e8803c)
Solutions
- Remove the `validate_job_arguments`/schema validation setting on the script or job input
- Attach an explicit JSON schema to the script (script settings) so inference is not needed
- Use a language that supports signature inference (e.g. Python typed main args, TypeScript) if you want inference
- If the language should support inference, check the script has a parseable main entrypoint with typed parameters
Example fix
// before: job input with validation but no schema
{ "validate_job_arguments": true, "args": {"x": 1} }
// after: either drop validation
{ "args": {"x": 1} }
// or attach an explicit schema to the script settings Defensive patterns
Strategy: validation
Validate before calling
// before submitting
if (jobInput.validate_job_arguments && !jobInput.schema && !languageSupportsSignatureInference(language)) {
throw new Error("Provide an explicit schema or disable schema validation");
} Type guard
function canValidate(args) { return !args.validate_job_arguments || !!args.schema; } Prevention
- Attach an explicit JSON schema when enabling argument validation
- Only enable validation for languages supporting signature inference
- Re-check validation settings after changing a script's language
- Test script submission after import/migration to catch dropped schemas
When it happens
Trigger: Submitting a script/job with schema validation enabled for a language whose entrypoint signature cannot be parsed (language not supporting main-arg introspection), without attaching an explicit JSON schema to the script or job.
Common situations: Scripts created via API/CLI with `validate_job_arguments: true` but no schema, language changed after schema settings were applied, importing scripts from templates where the signature isn't extractable, compiled/minified entrypoints.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Missing required arguments: ${required.join(", ")}. Use -d '
- Invalid flow modules:\n${errors.join('\n')}
- Invalid failure_module: only "rawscript" and "script" module
- Invalid note at index ${index}: position must be an object w
- Invalid note at index ${index}: size must be an object with
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/304cc08bd71712ca.
Report an issue: GitHub.