{"record":{"id":"aa2ab64e9d64bb3c","repo":"conductor-oss/conductor","slug":"failed-to-read-skill-package-e-getmessage","errorCode":null,"errorMessage":"Failed to read skill package: {e.getMessage()}","messagePattern":"Failed to read skill package: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/SkillRegistryService.java","lineNumber":420,"sourceCode":"            throw new IllegalArgumentException(\"Skill manifest is required\");\n        }\n        try {\n            return MAPPER.readValue(manifestJson, MAP_TYPE);\n        } catch (IOException e) {\n            throw new IllegalArgumentException(\"Invalid skill manifest JSON: \" + e.getMessage(), e);\n        }\n    }\n\n    private byte[] readPackage(MultipartFile packageFile) {\n        try {\n            byte[] bytes = packageFile.getBytes();\n            if (bytes.length > maxPackageBytes) {\n                throw new IllegalArgumentException(\n                        \"Skill package exceeds max size of \" + maxPackageBytes + \" bytes\");\n            }\n            return bytes;\n        } catch (IOException e) {\n            throw new IllegalArgumentException(\n                    \"Failed to read skill package: \" + e.getMessage(), e);\n        }\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    private ParsedSkillPackage parseSkillPackage(byte[] bytes, Map<String, Object> manifest) {\n        List<SkillFileEntry> files = new ArrayList<>();\n        Map<String, byte[]> contentByPath = new TreeMap<>();\n        long totalUncompressedBytes = 0;\n        try (ZipInputStream zip = new ZipInputStream(new ByteArrayInputStream(bytes))) {\n            ZipEntry entry;\n            while ((entry = zip.getNextEntry()) != null) {\n                if (entry.isDirectory()) {\n                    continue;\n                }\n                if (files.size() >= maxFileCount) {\n                    throw new IllegalArgumentException(\n                            \"Skill package exceeds max file count of \" + maxFileCount);","sourceCodeStart":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/SkillRegistryService.java#L402-L438","documentation":"Thrown by register() (via readPackage) when packageFile.getBytes() throws an IOException. This is an I/O failure reading the uploaded multipart file's bytes from its temporary storage, not a content error. The original IOException is attached as the cause.","triggerScenarios":"POST /api/skills/register where Spring's multipart temp file was deleted mid-request, the temp dir is full or unwritable, or the client disconnected during upload leaving a partial temp file.","commonSituations":"Low disk space in the multipart temp directory; a reverse proxy timing out and closing the connection; container ephemeral storage exhaustion; the temp file cleaned up by another process during a slow upload.","solutions":["Check server disk space in the multipart temp location (spring.servlet.multipart.location).","Increase client upload timeout and retry the upload.","Inspect the caused-by IOException for the specific I/O error (No space left, file not found, etc.)."],"exampleFix":"// no code fix — operational recovery\n# ensure temp dir has space and retry the upload\ndf -h /tmp\nPOST /api/skills/register (retry)","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { skillRegistryService.register(manifest, pkg); }\ncatch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Failed to read skill package\")) {\n        // check temp-dir disk space, then retry the upload\n    } else throw e;\n}","preventionTips":["Ensure the multipart temp directory has adequate free space and is writable.","Use a stable client upload timeout to avoid partial temp files."],"tags":["java","conductor","skill-registry","io","multipart-upload","runtime-error"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}