{"record":{"id":"a7517920f26a7cff","repo":"GoogleContainerTools/jib","slug":"unknown-schemaversion-schemaversion-only","errorCode":null,"errorMessage":"Unknown schemaVersion: + schemaVersion + \" - only 1 and 2 are supported\"","messagePattern":"Unknown schemaVersion: \\+ schemaVersion \\+ \" - only 1 and 2 are supported\"","errorType":"exception","errorClass":"UnknownManifestFormatException","httpStatus":null,"severity":"error","filePath":"jib-core/src/main/java/com/google/cloud/tools/jib/registry/AbstractManifestPuller.java","lineNumber":187,"sourceCode":"      if (OciManifestTemplate.MANIFEST_MEDIA_TYPE.equals(mediaType)) {\n        return manifestTemplateClass.cast(\n            JsonTemplateMapper.readJson(jsonString, OciManifestTemplate.class));\n      }\n      if (V22ManifestTemplate.MANIFEST_MEDIA_TYPE.equals(mediaType)) {\n        return manifestTemplateClass.cast(\n            JsonTemplateMapper.readJson(jsonString, V22ManifestTemplate.class));\n      }\n      if (V22ManifestListTemplate.MANIFEST_MEDIA_TYPE.equals(mediaType)) {\n        return manifestTemplateClass.cast(\n            JsonTemplateMapper.readJson(jsonString, V22ManifestListTemplate.class));\n      }\n      if (OciIndexTemplate.MEDIA_TYPE.equals(mediaType)) {\n        return manifestTemplateClass.cast(\n            JsonTemplateMapper.readJson(jsonString, OciIndexTemplate.class));\n      }\n      throw new UnknownManifestFormatException(\"Unknown mediaType: \" + mediaType);\n    }\n    throw new UnknownManifestFormatException(\n        \"Unknown schemaVersion: \" + schemaVersion + \" - only 1 and 2 are supported\");\n  }\n\n  @Override\n  public R handleHttpResponseException(ResponseException responseException)\n      throws ResponseException, RegistryErrorException {\n    throw responseException;\n  }\n}\n","sourceCodeStart":169,"sourceCodeEnd":197,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-core/src/main/java/com/google/cloud/tools/jib/registry/AbstractManifestPuller.java#L169-L197","documentation":"Thrown by AbstractManifestPuller.getManifestTemplateFromJson when the manifest's schemaVersion is neither 1 nor 2 (or absent mediaType handling for 2 already failed). Jib supports only Docker schema versions 1 and 2, so any other integer is rejected. It surfaces as UnknownManifestFormatException listing the unsupported version.","triggerScenarios":"A registry returns a manifest with schemaVersion 3 or 0, or an unusual integer — e.g. a hypothetical future registry format or a corrupted response.","commonSituations":"Forward-looking/nonstandard registries, proxies injecting their own schema versions, or response corruption from middleware.","solutions":["Check the manifest's schemaVersion value returned by the registry with a raw curl request.","Point Jib at a registry implementing the Docker Registry API v2 (schemaVersion 1 or 2).","Upgrade Jib in case a newer version supports the schema version in question.","Remove/fix any proxy or middleware that rewrites manifest JSON."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// preflight: schemaVersion must be 1 or 2\n// curl -s <manifest-url> | jq '.schemaVersion'\n// expect: 1 or 2","typeGuard":null,"tryCatchPattern":"// catch and diagnose unsupported schema versions\ntry {\n    jibContainerBuilder.containerize();\n} catch (RegistryErrorException e) {\n    if (e.getMessage().contains(\"Unknown schemaVersion\")) {\n        throw new IllegalStateException(\"Registry serves an unsupported manifest schema version — use a Docker Registry v2-compatible registry\", e);\n    }\n    throw e;\n}","preventionTips":["Use registries implementing the Docker Registry HTTP API v2.","Strip middleware that injects custom schema versions into responses.","Keep Jib updated for future schema support."],"tags":["docker-registry","manifest","registry-protocol"],"backgroundTag":"unsupported-enum-value","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}