{"record":{"id":"55925e6b40f9763f","repo":"kestra-io/kestra","slug":"unable-to-create-the-file","errorCode":null,"errorMessage":"Unable to create the file: {}","messagePattern":"Unable to create the file: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/runners/FilesService.java","lineNumber":50,"sourceCode":"                    runContext,\n                    additionalVars,\n                    inputs\n                )\n        );\n\n        inputFiles\n            .forEach(throwBiConsumer((fileName, input) ->\n            {\n                var file = runContext.workingDir().resolve(Path.of(runContext.render(fileName, additionalVars))).toFile();\n\n                if (!file.getParentFile().exists()) {\n                    //noinspection ResultOfMethodCallIgnored\n                    file.getParentFile().mkdirs();\n                }\n\n                if (input == null) {\n                    if (!file.createNewFile()) {\n                        throw new RuntimeException(\"Unable to create the file: \" + file.getName());\n                    }\n                } else {\n                    if (URIFetcher.supports(input)) {\n                        var uri = URIFetcher.of(input);\n                        try (\n                            var is = new BufferedInputStream(uri.fetch(runContext), FileSerde.BUFFER_SIZE);\n                            var out = new FileOutputStream(file)\n                        ) {\n                            IOUtils.copyLarge(is, out);\n                        }\n                    } else {\n                        Files.write(file.toPath(), input.getBytes());\n                    }\n                }\n            }));\n\n        if (logger.isTraceEnabled()) {\n            logger.trace(\"Provided {} input(s).\", inputFiles.size());","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/core/src/main/java/io/kestra/core/runners/FilesService.java#L32-L68","documentation":"Error \"Unable to create the file: {}\" thrown in kestra-io/kestra.","triggerScenarios":"Thrown at core/src/main/java/io/kestra/core/runners/FilesService.java:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the target path's parent directory exists and the process has write permission on it.","Verify the path is valid and not conflicting with an existing directory or read-only file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}