GoogleContainerTools/skaffold · error

unable to find %s in output: %s

Error message

unable to find %s in output: %s

What it means

After `helm package` succeeds, skaffold locates the produced .tgz path inside helm's stdout output. If the temp dir string does not appear in the output, skaffold cannot determine the packaged chart path and throws this error.

Source

Thrown at pkg/skaffold/deploy/helm/helm.go:705

	if r.Packaged.AppVersion != "" {
		av, err := util.ExpandEnvTemplate(r.Packaged.AppVersion, nil)
		if err != nil {
			return "", fmt.Errorf("packaged.appVersion template: %w", err)
		}
		args = append(args, "--app-version", av)
	}

	buf := &bytes.Buffer{}

	if err := helm.Exec(ctx, h, buf, false, nil, args...); err != nil {
		return "", fmt.Errorf("package chart into a .tgz archive: %v: %w", args, err)
	}

	output := strings.TrimSpace(buf.String())
	idx := strings.Index(output, tmpDir)

	if idx == -1 {
		return "", fmt.Errorf("unable to find %s in output: %s", tmpDir, output)
	}

	return output[idx:], nil
}

func (h *Deployer) warnAboutUnusedImages(builds []graph.Artifact, manifests manifest.ManifestList) {
	seen := map[string]bool{}
	images, _ := manifests.GetImages(manifest.NewResourceSelectorImages(h.transformableAllowlist, h.transformableDenylist))
	for _, a := range images {
		seen[a.Tag] = true
	}
	for _, b := range builds {
		if !seen[b.Tag] {
			warnings.Printf("image [%s] is not used.", b.Tag)
			warnings.Printf("See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration")
		}
	}
}

View on GitHub (pinned to a1189de023)

Solutions

  1. Check the helm version skaffold uses (skaffold embeds/invokes helm; ensure standard helm output)
  2. Run `helm package <chart> --destination <tmpDir>` manually and confirm output contains the full path
  3. Avoid wrapper scripts around helm that rewrite stdout
  4. Upgrade or downgrade helm to a version compatible with your skaffold

Example fix

// before
#!/bin/sh
helm "$@" | sed 's|/tmp/skaffold-helm|REDACTED|'
// after
#!/bin/sh
exec helm "$@"   # do not rewrite helm stdout paths
Defensive patterns

Strategy: try-catch

Validate before calling

cmd := exec.Command("helm", "package", release.ChartPath, "--destination", tmpDir)
out, err := cmd.Output()
if err != nil { return err }
if !strings.Contains(string(out), tmpDir) {
  return fmt.Errorf("helm output missing %s: %s", tmpDir, out)
}

Try / catch

if _, err := packageChart(ctx, h, r, builds); err != nil && strings.Contains(err.Error(), "unable to find") {
  // inspect raw helm output; try a different helm version
}

Prevention

When it happens

Trigger: Calling Deploy with a packaged release when helm's stdout format changes (different helm version phrasing, localized output, or output swallowed/redirected so buf is empty or truncated).

Common situations: Newer/older helm CLI printing a different "Saved: <path>" line; shell/locale modifications; wrapping helm in a script that alters stdout.

Related errors


AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05). Data as JSON: /api/errors/ebc5ff3d8d23443a. Report an issue: GitHub.