{"record":{"id":"39c6a61ea5857172","repo":"slimtoolkit/slim","slug":"dockerimage-loadpackage-missing-oci-image-manifes","errorCode":null,"errorMessage":"dockerimage.LoadPackage: missing OCI Image Manifest object for image ID=%s / archive='%s' / files=%+v","messagePattern":"dockerimage\\.LoadPackage: missing OCI Image Manifest object for image ID=(.+?) / archive='(.+?)' / files=%\\+v","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pkg/docker/dockerimage/dockerimage.go","lineNumber":1119,"sourceCode":"\t\t\t\t\t\tchangeDataMatchers,\n\t\t\t\t\t\tutf8Detector,\n\t\t\t\t\t\tprocessorParams,\n\t\t\t\t\t)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tlog.Errorf(\"dockerimage.LoadPackage: error reading oci layer from archive(%s/%s) - %v\", archivePath, hdr.Name, err)\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\tlayers[layerID] = layer\n\t\t\t\t\tlog.Debugf(\"dockerimage.LoadPackage: saved layer '%s' from archive - %s\",\n\t\t\t\t\t\tlayerID, archivePath)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif pkg.Format == FormatOCI {\n\t\tif pkg.ManifestOCI == nil {\n\t\t\treturn nil, fmt.Errorf(\"dockerimage.LoadPackage: missing OCI Image Manifest object for image ID=%s / archive='%s' / files=%+v\",\n\t\t\t\timageID, archivePath, archiveFiles)\n\t\t}\n\t} else {\n\t\tif pkg.Manifest == nil {\n\t\t\treturn nil, fmt.Errorf(\"dockerimage.LoadPackage: missing manifest object for image ID=%s / archive='%s' / files=%+v\",\n\t\t\t\timageID, archivePath, archiveFiles)\n\t\t}\n\t}\n\n\tif pkg.Config == nil {\n\t\treturn nil, fmt.Errorf(\"dockerimage.LoadPackage: missing image config object for image ID=%s / archive='%s' / files=%+v\",\n\t\t\timageID, archivePath, archiveFiles)\n\t}\n\n\tif len(layers) == 0 {\n\t\t//todo: display non-image layer metadata if there are any\n\t\t//todo: save non-image layer metadata/data\n\t\tlog.Debugf(\"dockerimage.LoadPackage: no image layers in archive - %s (%+v)\",","sourceCodeStart":1101,"sourceCodeEnd":1137,"githubUrl":"https://github.com/slimtoolkit/slim/blob/81940d17fa112cc678e32209214bcb2355cb3004/pkg/docker/dockerimage/dockerimage.go#L1101-L1137","documentation":"dockerimage.LoadPackage validates that, for OCI-format packages, the OCI Image Manifest object was successfully loaded from the archive. A nil pkg.ManifestOCI means the archive's files did not yield the OCI manifest (index/manifest blob missing or unrecognized), so loading aborts with the image ID, archive path, and file list for diagnosis.","triggerScenarios":"Calling LoadPackage on an OCI-layout tar/archive whose files do not include a resolvable OCI image manifest for the given imageID — e.g. an image index pointing to a missing manifest blob, a truncated archive, or files parsed under FormatOCI that are actually docker/save format.","commonSituations":"Partially downloaded or truncated OCI archives (craned/skopeo copy interrupted); multi-arch image indexes saved without the child manifests; archives renamed/edited so the manifest reference no longer matches; wrong format detection forcing FormatOCI on a docker-archive.","solutions":["Re-export/re-download the image archive (skopeo copy / crane pull / docker save) and verify it completes without interruption.","Check the error's files list and the OCI index: ensure the manifest digest referenced exists as a blob in the archive.","For multi-arch images, save a platform-specific manifest (e.g. `docker save` of a pulled single-platform image) instead of only the index.","Confirm the package's detected format matches the archive type; force the correct format if auto-detection mislabeled it."],"exampleFix":"// before: index-only archive missing manifest blobs\n$ crane manifest myapp.tar  -> error: missing OCI Image Manifest\n// after: fetch full image with all blobs\n$ crane pull --platform=linux/amd64 myapp:1.2 myapp.tar","handlingStrategy":"validation","validationCode":"// verify OCI archive completeness before LoadPackage\nfunc ociManifestPresent(files []string, indexDigest string) bool {\n\tfor _, f := range files {\n\t\tif strings.Contains(f, indexDigest) { return true }\n\t}\n\treturn false\n}\n// also: skopeo inspect oci-archive:app.tar must succeed","typeGuard":"func isOCILayout(p *dockerimage.Package) bool { return p != nil && p.Format == dockerimage.FormatOCI }","tryCatchPattern":"pkg, err := dockerimage.LoadPackage(...)\nif err != nil && strings.Contains(err.Error(), \"missing OCI Image Manifest\") {\n\t// re-pull the archive; do not retry parsing the same file\n}","preventionTips":["Use crane pull/skopeo copy with complete-blob verification","For multi-arch indexes, save a single-platform manifest","Validate archives with skopeo inspect before ingestion"],"tags":["oci","image-manifest","docker","archive"],"backgroundTag":"missing-image-manifest","analyzedSha":"81940d17fa112cc678e32209214bcb2355cb3004","analyzedAt":"2026-08-31T23:06:12.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}