{"record":{"id":"283b7238b643032e","repo":"wagoodman/dive","slug":"not-implemented","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dive/image/docker/archive_resolver.go","lineNumber":41,"sourceCode":"\treader, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer reader.Close()\n\n\timg, err := NewImageArchive(reader)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn img.ToImage(path)\n}\n\nfunc (r *archiveResolver) Build(ctx context.Context, args []string) (*image.Image, error) {\n\treturn nil, fmt.Errorf(\"build option not supported for docker archive resolver\")\n}\n\nfunc (r *archiveResolver) Extract(ctx context.Context, id string, l string, p string) error {\n\treturn fmt.Errorf(\"not implemented\")\n}\n","sourceCodeStart":23,"sourceCodeEnd":43,"githubUrl":"https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/archive_resolver.go#L23-L43","documentation":"Returned by archiveResolver.Extract (dive/image/docker/archive_resolver.go:41) with a bare 'not implemented' message. Extract is meant to export a layer's contents to disk; the docker-archive resolver never implements it, so extraction from a saved tar is unsupported in this version.","triggerScenarios":"Any Extract() call on the resolver from NewResolverFromArchive(): CLI paths that trigger layer/file extraction with --source docker-archive, or library code that uniformly calls Extract across resolvers.","commonSituations":"Tooling built on dive's Resolver interface that assumes all resolvers implement the full surface; users trying to export a layer from a docker-save tarball through dive instead of tar itself.","solutions":["Extract manually: the saved tarball is a regular tar - untar it and then untar the layer tar inside (tar -xf image.tar; tar -xf <layer>.tar)","Or re-load and extract via the engine: docker load -i image.tar, then run dive against docker://<image> which supports Extract","Library callers: probe capability before calling (check for the archive resolver type or an optional interface) rather than calling blindly"],"exampleFix":"// before: assuming every resolver can extract\nerr := resolver.Extract(ctx, id, layerPath, dest)\n\n// after: feature-detect first\ntype extractor interface{ Extract(ctx context.Context, id, l, p string) error }\nif _, ok := resolver.(extractor); !ok || isArchiveResolver(resolver) {\n    return fmt.Errorf(\"source does not support extraction; untar the archive manually\")\n}","handlingStrategy":"validation","validationCode":"// feature-detect instead of calling Extract blindly\nif src == dive.SourceDockerArchive {\n    return extractFromArchiveManually(tarPath, layer, dest) // plain tar extraction\n}\nerr := resolver.Extract(ctx, id, layer, dest)","typeGuard":null,"tryCatchPattern":"err := resolver.Extract(ctx, id, layer, dest)\nif err != nil {\n    if strings.Contains(err.Error(), \"not implemented\") {\n        // graceful degradation: untar the archive yourself\n        err = extractLayerWithTar(tarPath, layer, dest)\n    }\n    if err != nil {\n        return err\n    }\n}","preventionTips":["Remember the docker-archive resolver supports Fetch only","For archives, extract layers with tar directly - the format is plain tar-in-tar","Gate Extract calls on the configured image source"],"tags":["docker-archive","extract","not-implemented","unsupported-operation"],"backgroundTag":null,"analyzedSha":"d6c691947f8fda635c952a17ee3b7555379d58f0","analyzedAt":"2026-08-15T09:42:35.293Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}