helm/helm · error

no results found

Error message

no results found

What it means

Returned by repoSearchWriter.WriteTable when 'helm search repo' found zero charts, --fail-on-no-result is enabled, and output is the default table format. It is the table-output counterpart of the JSON/YAML check in encodeByFormat: with the flag, zero results become a hard error; without it, Helm prints 'No results found' and exits 0.

Source

Thrown at pkg/cmd/search_repo.go:219

type repoChartElement struct {
	Name        string `json:"name"`
	Version     string `json:"version"`
	AppVersion  string `json:"app_version"`
	Description string `json:"description"`
}

type repoSearchWriter struct {
	results        []*search.Result
	columnWidth    uint
	failOnNoResult bool
}

func (r *repoSearchWriter) WriteTable(out io.Writer) error {
	if len(r.results) == 0 {
		// Fail if no results found and --fail-on-no-result is enabled
		if r.failOnNoResult {
			return errors.New("no results found")
		}

		_, err := out.Write([]byte("No results found\n"))
		if err != nil {
			return fmt.Errorf("unable to write results: %w", err)
		}
		return nil
	}
	table := uitable.New()
	table.MaxColWidth = r.columnWidth
	table.AddRow("NAME", "CHART VERSION", "APP VERSION", "DESCRIPTION")
	for _, r := range r.results {
		table.AddRow(r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description)
	}
	return output.EncodeTable(out, table)
}

func (r *repoSearchWriter) WriteJSON(out io.Writer) error {

View on GitHub (pinned to 2a29f1770b)

Solutions

  1. Run 'helm repo update' so cached indexes reflect current upstream content, then retry.
  2. Broaden or correct the search term (search matches name, description and keywords).
  3. If empty results are acceptable, remove --fail-on-no-result.

Example fix

# before
helm search repo mychart --fail-on-no-result   # Error: no results found

# after
helm repo update && helm search repo mychart --fail-on-no-result
Defensive patterns

Strategy: validation

Validate before calling

// Validate hit count before writing table output.
if len(results) == 0 && failOnNoResult {
    return fmt.Errorf("no charts matched %q in configured repositories", term)
}
err := writer.WriteTable(out)

Try / catch

if err := writer.WriteTable(out); err != nil {
    if strings.Contains(err.Error(), "no results found") { /* empty set, not an IO failure */ }
}

Prevention

When it happens

Trigger: Running 'helm search repo <term> --fail-on-no-result' (table output) with zero matches in all cached repo indexes.

Common situations: Stale local index after a chart was renamed upstream; search term not matching any chart name/description/keywords; CI existence checks gating on chart availability.

Related errors


AI-assisted analysis of helm/helm@2a29f1770b (2026-08-15). Data as JSON: /api/errors/3ac8c2144398f5e7. Report an issue: GitHub.