{"record":{"id":"304cc08bd71712ca","repo":"windmill-labs/windmill","slug":"job-was-expected-to-validate-the-arguments-schema","errorCode":null,"errorMessage":"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","messagePattern":"Job was expected to validate the arguments schema, but no schema was provided and couldn't be inferred from the script for language `(.+?)`\\. Try removing schema validation for this job","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-worker/src/worker.rs","lineNumber":5165,"sourceCode":"    if let Some(args) = job.args.as_ref() {\n        if let Some(sv) = schema_validator {\n            sv.validate(args)?;\n        } else {\n            let validators_cache = cache::anon!({ (u8, ScriptHash) => Arc<Option<SchemaValidator>> } in \"schemavalidators\" <= 1000);\n\n            let sv_fut = async move {\n                if language.map(|l| should_validate_schema(code, l)).unwrap_or(false) {\n                    if let Some(schema) = schema {\n                        Ok(Some(SchemaValidator::from_schema(schema)?))\n                    } else {\n                        if let Some(sig) = parse_sig_of_lang(\n                            code,\n                            language,\n                            job.script_entrypoint_override.clone(),\n                        )? {\n                            Ok(Some(schema_validator_from_main_arg_sig(&sig)))\n                        } else {\n                            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())\n                        }\n                    }\n                } else { Ok(None) }\n            }\n            .map_ok(Arc::new);\n\n            let sub_key: u8 = match job.kind {\n                JobKind::Script => 0,\n                JobKind::FlowScript => 1,\n                JobKind::AppScript => 2,\n                JobKind::Script_Hub => 3,\n                JobKind::Preview => 4,\n                JobKind::DeploymentCallback => 5,\n                JobKind::SingleStepFlow => 6,\n                JobKind::Dependencies => 7,\n                JobKind::Flow => 8,\n                JobKind::FlowPreview => 9,\n                JobKind::Identity => 10,","sourceCodeStart":5147,"sourceCodeEnd":5183,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-worker/src/worker.rs#L5147-L5183","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before: job input with validation but no schema\n{ \"validate_job_arguments\": true, \"args\": {\"x\": 1} }\n// after: either drop validation\n{ \"args\": {\"x\": 1} }\n// or attach an explicit schema to the script settings","handlingStrategy":"validation","validationCode":"// before submitting\nif (jobInput.validate_job_arguments && !jobInput.schema && !languageSupportsSignatureInference(language)) {\n  throw new Error(\"Provide an explicit schema or disable schema validation\");\n}","typeGuard":"function canValidate(args) { return !args.validate_job_arguments || !!args.schema; }","tryCatchPattern":null,"preventionTips":["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"],"tags":["schema","validation","arguments"],"backgroundTag":"schema-validation-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"}