wagoodman/dive · error

no results returned

Error message

no results returned

What it means

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).

Source

Thrown at cmd/dive/cli/internal/command/adapter/analyzer.go:64

			Default:      "Analyzing image",
			WhileRunning: "Analyzing image",
			OnSuccess:    "Analyzed image",
		},
		HideOnSuccess:      false,
		HideStageOnSuccess: false,
		ID:                 img.Request,
		Context:            fmt.Sprintf("[layers:%d files:%s size:%s]", layers, filesStr, fileSizeStr),
	})

	analysis, err := a.Analyzer(ctx, img)
	if err != nil {
		mon.SetError(err)
	} else {
		mon.SetCompleted()
	}

	if err == nil && analysis == nil {
		err = fmt.Errorf("no results returned")
	}

	return analysis, err
}

View on GitHub (pinned to d6c691947f)

Solutions

  1. Verify the image actually exists and has content: docker images / docker save the image and check its size
  2. Re-pull the image (--source docker with a fresh pull) to rule out a corrupted local cache
  3. Try the other source flag (--source podman or docker) to isolate an engine-specific extraction bug
  4. Check dive version against the engine version; upgrade dive if the analyzer backend is stale
Defensive patterns

Strategy: validation

Validate before calling

// before analyzing, verify the image has analyzable content
if img == nil || len(img.Layers) == 0 {
    return fmt.Errorf("image has no layers to analyze: %s", img.Request)
}
analysis, err := adapter.NewAnalyzer().Analyze(ctx, img)

Try / catch

analysis, err := adapter.NewAnalyzer().Analyze(ctx, img)
if err != nil {
    if strings.Contains(err.Error(), "no results returned") {
        // nil,nil contract violation upstream: re-pull or report image manifest
        log.Printf("analyzer returned nothing for %s; re-pulling", img.Request)
    }
    return err
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of wagoodman/dive@d6c691947f (2026-08-15). Data as JSON: /api/errors/82060607861325de. Report an issue: GitHub.