{"record":{"id":"1dc2a4ae50285bc8","repo":"apache/maven","slug":"unknown-error-during-artifact-resolution","errorCode":null,"errorMessage":"Unknown error during artifact resolution, {}, {}","messagePattern":"Unknown error during artifact resolution, (.+?), (.+?)","errorType":"exception","errorClass":"ArtifactResolutionException","httpStatus":null,"severity":"error","filePath":"compat/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultResolutionErrorHandler.java","lineNumber":74,"sourceCode":"        }\n\n        // Transfer Error\n\n        if (result.hasErrorArtifactExceptions()) {\n            throw result.getErrorArtifactExceptions().get(0);\n        }\n\n        if (result.hasMissingArtifacts()) {\n            throw new MultipleArtifactsNotFoundException(\n                    request.getArtifact(),\n                    toList(result.getArtifacts()),\n                    result.getMissingArtifacts(),\n                    request.getRemoteRepositories());\n        }\n\n        // this should never happen since we checked all possible error sources before but better be sure\n        if (result.hasExceptions()) {\n            throw new ArtifactResolutionException(\n                    \"Unknown error during artifact resolution, \" + request + \", \" + result.getExceptions(),\n                    request.getArtifact(),\n                    request.getRemoteRepositories());\n        }\n    }\n\n    private static <T> List<T> toList(Collection<T> items) {\n        return (items != null) ? new ArrayList<>(items) : null;\n    }\n}\n","sourceCodeStart":56,"sourceCodeEnd":85,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/compat/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultResolutionErrorHandler.java#L56-L85","documentation":"DefaultResolutionErrorHandler.onErrors converts an ArtifactResult into legacy exceptions; after handling missing artifacts it checks result.hasExceptions() again and, if exceptions remain, wraps them in ArtifactResolutionException ('Unknown error during artifact resolution') - the code itself comments this 'should never happen'. It is a defensive catch-all for resolver failures that are neither not-found nor already-handled, and the real causes are printed in the message via result.getExceptions().","triggerScenarios":"Artifact resolution completing with exception(s) that are not ArtifactNotFoundException and with no missing-artifact list: simultaneous multi-repository transport errors, a custom Wagon or resolver extension throwing, checksum-policy failures after local file cleanup, or disk-full while spooling artifacts.","commonSituations":"Flaky networks producing concurrent failures across several repositories; custom resolver extensions in the build misbehaving; repository managers resetting long-lived connections; disk exhaustion during download.","solutions":["Read the exception list embedded in the message and re-run with -e -X for full stack traces - the actionable cause is in result.getExceptions()","Fix the dominant underlying exception (usually a TransferFailedException, SSL, or disk error)","If reproducible, audit and remove conflicting resolver/wagon extensions declared in the build or settings","For intermittent network cases, retry the build and route repositories through one stable internal mirror"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"Catch ArtifactResolutionException and iterate the exception chain (getCause() and getExceptions() where available); find the first TransferFailed/IO exception and handle that root cause. Treat the 'Unknown error during artifact resolution' message as a wrapper signal, log the children verbatim.","preventionTips":["Run CI builds with -e and archive the debug log for post-mortem.","Route all repositories through a single internal mirror to reduce multi-repository fan-out failures.","Keep resolver/wagon extensions minimal and current; remove ones you no longer need."],"tags":["maven","artifact-resolution","resolver","diagnostics"],"backgroundTag":"artifact-resolution-failed","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}