{"record":{"id":"82060607861325de","repo":"wagoodman/dive","slug":"no-results-returned","errorCode":null,"errorMessage":"no results returned","messagePattern":"no results returned","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/dive/cli/internal/command/adapter/analyzer.go","lineNumber":64,"sourceCode":"\t\t\tDefault:      \"Analyzing image\",\n\t\t\tWhileRunning: \"Analyzing image\",\n\t\t\tOnSuccess:    \"Analyzed image\",\n\t\t},\n\t\tHideOnSuccess:      false,\n\t\tHideStageOnSuccess: false,\n\t\tID:                 img.Request,\n\t\tContext:            fmt.Sprintf(\"[layers:%d files:%s size:%s]\", layers, filesStr, fileSizeStr),\n\t})\n\n\tanalysis, err := a.Analyzer(ctx, img)\n\tif err != nil {\n\t\tmon.SetError(err)\n\t} else {\n\t\tmon.SetCompleted()\n\t}\n\n\tif err == nil && analysis == nil {\n\t\terr = fmt.Errorf(\"no results returned\")\n\t}\n\n\treturn analysis, err\n}\n","sourceCodeStart":46,"sourceCodeEnd":69,"githubUrl":"https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/adapter/analyzer.go#L46-L69","documentation":"Returned by the analyzer adapter when the underlying image analyzer call returns (nil analysis, nil error) — a contract violation where the analysis succeeded but produced no result object. It is a defensive guard so callers never receive a nil *image.Analysis with a nil error, which would panic later during evaluation or export. In practice it usually masks an upstream resolution failure (e.g. no image payload could be read).","triggerScenarios":"Calling adapter.Analyze(ctx, img) where the analyzer implementation returns nil, nil — for example when the image has no layers to analyze, an unsupported/empty manifest, or an analyzer backend that silently bails out.","commonSituations":"Analyzing a scratch or distroless-style image with a container engine that returns metadata but no file tree; a docker/podman version mismatch where the engine returns an empty layer payload; or a corrupted local image cache.","solutions":["Verify the image actually exists and has content: docker images / docker save the image and check its size","Re-pull the image (--source docker with a fresh pull) to rule out a corrupted local cache","Try the other source flag (--source podman or docker) to isolate an engine-specific extraction bug","Check dive version against the engine version; upgrade dive if the analyzer backend is stale"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before analyzing, verify the image has analyzable content\nif img == nil || len(img.Layers) == 0 {\n    return fmt.Errorf(\"image has no layers to analyze: %s\", img.Request)\n}\nanalysis, err := adapter.NewAnalyzer().Analyze(ctx, img)","typeGuard":null,"tryCatchPattern":"analysis, err := adapter.NewAnalyzer().Analyze(ctx, img)\nif err != nil {\n    if strings.Contains(err.Error(), \"no results returned\") {\n        // nil,nil contract violation upstream: re-pull or report image manifest\n        log.Printf(\"analyzer returned nothing for %s; re-pulling\", img.Request)\n    }\n    return err\n}","preventionTips":["Validate the image is non-empty (has layers) before analysis","Keep dive updated alongside your container engine","Re-pull images when extraction behaves oddly instead of retrying the same blob"],"tags":["analysis","nil-guard","docker","podman","image-layers"],"backgroundTag":null,"analyzedSha":"d6c691947f8fda635c952a17ee3b7555379d58f0","analyzedAt":"2026-08-15T09:42:35.293Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}