{"record":{"id":"752f0bbb604aa9b8","repo":"helm/helm","slug":"manifest-does-not-contain-a-layer-with-mediatype","errorCode":null,"errorMessage":"manifest does not contain a layer with mediatype %s","messagePattern":"manifest does not contain a layer with mediatype (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/registry/client.go","lineNumber":480,"sourceCode":"\t\tswitch d.MediaType {\n\t\tcase ConfigMediaType:\n\t\t\tconfigDescriptor = &d\n\t\tcase ChartLayerMediaType:\n\t\t\tchartDescriptor = &d\n\t\tcase ProvLayerMediaType:\n\t\t\tprovDescriptor = &d\n\t\tcase LegacyChartLayerMediaType:\n\t\t\tchartDescriptor = &d\n\t\t\t_, _ = fmt.Fprintf(c.out, \"Warning: chart media type %s is deprecated\\n\", LegacyChartLayerMediaType)\n\t\t}\n\t}\n\n\t// Chart-specific validation\n\tif configDescriptor == nil {\n\t\treturn nil, fmt.Errorf(\"could not load config with mediatype %s\", ConfigMediaType)\n\t}\n\tif operation.withChart && chartDescriptor == nil {\n\t\treturn nil, fmt.Errorf(\"manifest does not contain a layer with mediatype %s\",\n\t\t\tChartLayerMediaType)\n\t}\n\n\tvar provMissing bool\n\tif operation.withProv && provDescriptor == nil {\n\t\tif !operation.ignoreMissingProv {\n\t\t\treturn nil, fmt.Errorf(\"manifest does not contain a layer with mediatype %s\",\n\t\t\t\tProvLayerMediaType)\n\t\t}\n\t\tprovMissing = true\n\t}\n\n\t// Build chart-specific result\n\tresult := &PullResult{\n\t\tManifest: &DescriptorPullSummary{\n\t\t\tDigest: genericResult.Manifest.Digest.String(),\n\t\t\tSize:   genericResult.Manifest.Size,\n\t\t},","sourceCodeStart":462,"sourceCodeEnd":498,"githubUrl":"https://github.com/helm/helm/blob/2a29f1770b62844b27197d2507377361d45ad7c0/pkg/registry/client.go#L462-L498","documentation":"The pull requested the chart content (operation.withChart, the default) but no layer in the manifest uses the chart media type application/vnd.cncf.helm.chart.content.v1.tar+gzip (or the legacy application/tar+gzip). The config descriptor exists but the actual chart tarball layer is missing.","triggerScenarios":"Pulling a manifest that has a Helm config but whose chart layer was never attached — interrupted pushes, registry GC deleting the layer, or hand-built manifests that omitted the tarball layer.","commonSituations":"Registry garbage collection run between push and pull; multi-arch or index artifacts mistakenly pushed under the chart reference; CI tooling assembling manifests manually.","solutions":["List the manifest layers (`crane manifest <ref>`) and confirm one has the Helm chart media type","Re-push the chart with `helm push chart.tgz oci://...` to recreate a complete manifest","If building with ORAS, attach the chart tarball with media type application/vnd.cncf.helm.chart.content.v1.tar+gzip"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"res, err := client.Pull(ref)\nif err != nil && strings.Contains(err.Error(), \"manifest does not contain a layer with mediatype \"+registry.ChartLayerMediaType) {\n\t// chart layer missing: re-push or fix the producer that builds the manifest\n}","preventionTips":["Do not run registry GC without a grace period longer than your push cadence","When assembling chart manifests by hand, include the tar.gz layer with the Helm chart media type"],"tags":["oci","chart","layer","pull","media-type"],"backgroundTag":null,"analyzedSha":"2a29f1770b62844b27197d2507377361d45ad7c0","analyzedAt":"2026-08-15T22:02:47.490Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}