{"record":{"id":"60aa48d5ffd0d245","repo":"GoogleContainerTools/jib","slug":"manifest-list-missing","errorCode":null,"errorMessage":"Manifest list missing","messagePattern":"Manifest list missing","errorType":"exception","errorClass":"CacheCorruptedException","httpStatus":null,"severity":"error","filePath":"jib-core/src/main/java/com/google/cloud/tools/jib/cache/CacheStorageReader.java","lineNumber":55,"sourceCode":"import java.util.Optional;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\n/** Reads from the default cache storage engine. */\nclass CacheStorageReader {\n\n  @VisibleForTesting\n  static void verifyImageMetadata(ImageMetadataTemplate metadata, Path metadataCacheDirectory)\n      throws CacheCorruptedException {\n    List<ManifestAndConfigTemplate> manifestsAndConfigs = metadata.getManifestsAndConfigs();\n    if (manifestsAndConfigs.isEmpty()) {\n      throw new CacheCorruptedException(metadataCacheDirectory, \"Manifest cache empty\");\n    }\n    if (manifestsAndConfigs.stream().anyMatch(entry -> entry.getManifest() == null)) {\n      throw new CacheCorruptedException(metadataCacheDirectory, \"Manifest(s) missing\");\n    }\n    if (metadata.getManifestList() == null && manifestsAndConfigs.size() != 1) {\n      throw new CacheCorruptedException(metadataCacheDirectory, \"Manifest list missing\");\n    }\n\n    ManifestTemplate firstManifest = manifestsAndConfigs.get(0).getManifest();\n    if (firstManifest instanceof V21ManifestTemplate) {\n      if (metadata.getManifestList() != null\n          || manifestsAndConfigs.stream().anyMatch(entry -> entry.getConfig() != null)) {\n        throw new CacheCorruptedException(metadataCacheDirectory, \"Schema 1 manifests corrupted\");\n      }\n    } else if (firstManifest instanceof BuildableManifestTemplate) {\n      if (manifestsAndConfigs.stream().anyMatch(entry -> entry.getConfig() == null)) {\n        throw new CacheCorruptedException(metadataCacheDirectory, \"Schema 2 manifests corrupted\");\n      }\n      if (metadata.getManifestList() != null\n          && manifestsAndConfigs.stream().anyMatch(entry -> entry.getManifestDigest() == null)) {\n        throw new CacheCorruptedException(metadataCacheDirectory, \"Schema 2 manifests corrupted\");\n      }\n    } else {\n      throw new CacheCorruptedException(","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-core/src/main/java/com/google/cloud/tools/jib/cache/CacheStorageReader.java#L37-L73","documentation":"For schema 2 images stored with a manifest list (multi-arch base images), verifyImageMetadata expects the metadata to include a manifest list and exactly one platform-specific manifest per entry. If the manifestList field is null while the entry count doesn't equal 1, the cached metadata is incomplete and CacheCorruptedException('Manifest list missing') is thrown.","triggerScenarios":"retrieveMetadata loads metadata cached for a manifest-list base image where getManifestList() is null and manifestsAndConfigs.size() != 1 — i.e., the index entry was lost or multiple per-platform manifests were cached without their parent list.","commonSituations":"Partial write of multi-arch base image metadata from an interrupted pull; switching the base image between a single-manifest tag and a manifest-list tag with a stale cache; cache corruption on shared CI storage.","solutions":["Clear the Jib cache directory for that base image (or the whole cache) and rebuild online","Run the build once with network access so the manifest list and platform manifests are re-fetched together","If you intended a single-platform base image, use a digest or tag that points directly at a single manifest rather than a list","Check for concurrent builds racing on the same cache directory; give each build its own cache"],"exampleFix":"// before\nmvn jib:build -Djib.offline=true   // metadata missing manifest list\n// after\nrm -rf ~/.cache/google-cloud-tools-jib\nmvn jib:build   // online rebuild stores complete manifest-list metadata","handlingStrategy":"retry","validationCode":"jq -e '.manifestList != null' \"$METADATA_FILE\" || rm -rf \"$IMG_CACHE_DIR\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid concurrent builds sharing one cache"],"tags":["cache","manifest-list","corruption","jib"],"backgroundTag":"cache-miss","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"}