{"record":{"id":"52aeda61cbe33140","repo":"GoogleContainerTools/skaffold","slug":"failed-to-interpret-q-as-index-v","errorCode":null,"errorMessage":"failed to interpret %q as index: %v","messagePattern":"failed to interpret %q as index: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/docker/platform.go","lineNumber":47,"sourceCode":")\n\n// GetPlatforms returns the platforms of the provided image.\nfunc GetPlatforms(image string) ([]spec.Platform, error) {\n\ti, err := getImage(image)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmt, err := i.MediaType()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar p []spec.Platform\n\tswitch mt {\n\tcase types.OCIImageIndex, types.DockerManifestList:\n\t\tix, ok := i.(v1.ImageIndex)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"failed to interpret %q as index: %v\", image, i)\n\t\t}\n\t\tmanifests, err := ix.IndexManifest()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, m := range manifests.Manifests {\n\t\t\tif m.Platform == nil || m.Platform.Architecture == \"unknown\" || m.Platform.OS == \"unknown\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tp = append(p, util.ConvertFromV1Platform(*m.Platform))\n\t\t}\n\tcase types.OCIManifestSchema1, types.DockerManifestSchema2:\n\t\tim, ok := i.(v1.Image)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"failed to interpret %q as image: %v\", image, im)\n\t\t}\n\t\tcf, err := im.ConfigFile()\n\t\tif err != nil {","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/docker/platform.go#L29-L65","documentation":"Fires in GetPlatforms when the image's media type is an OCI ImageIndex/Docker manifest list but the underlying object does not implement the ImageIndex interface — an internal go-containerregistry type-assertion failure, not a user config error.","triggerScenarios":"Thrown at pkg/skaffold/docker/platform.go:47 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry after re-pulling or re-pushing the image in case of a transient registry inconsistency","Rebuild/retag the image with current tooling to produce a clean index","Report to skaffold maintainers with the image reference, as this is an internal invariant failure"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}