{"record":{"id":"302c22e4300451b9","repo":"helm/helm","slug":"failed-reloading-chart-after-repo-update-w","errorCode":null,"errorMessage":"failed reloading chart after repo update: %w","messagePattern":"failed reloading chart after repo update: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/install.go","lineNumber":330,"sourceCode":"\t\t\tman := &downloader.Manager{\n\t\t\t\tOut:              out,\n\t\t\t\tChartPath:        cp,\n\t\t\t\tKeyring:          client.Keyring,\n\t\t\t\tSkipUpdate:       false,\n\t\t\t\tGetters:          p,\n\t\t\t\tRepositoryConfig: settings.RepositoryConfig,\n\t\t\t\tRepositoryCache:  settings.RepositoryCache,\n\t\t\t\tContentCache:     settings.ContentCache,\n\t\t\t\tDebug:            settings.Debug,\n\t\t\t\tRegistryClient:   client.GetRegistryClient(),\n\t\t\t\tSourceDateEpoch:  sourceDateEpoch,\n\t\t\t}\n\t\t\tif err := man.Update(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\t// Reload the chart with the updated Chart.lock file.\n\t\t\tif chartRequested, err = loader.Load(cp); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed reloading chart after repo update: %w\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\tclient.Namespace = settings.Namespace()\n\n\t// Create context and prepare the handle of SIGTERM\n\tctx := context.Background()\n\tctx, cancel := context.WithCancel(ctx)\n\n\t// Set up channel on which to send signal notifications.\n\t// We must use a buffered channel or risk missing the signal\n\t// if we're not ready to receive when the signal is sent.\n\tcSignal := make(chan os.Signal, 2)\n\tsignal.Notify(cSignal, os.Interrupt, syscall.SIGTERM)\n\tgo func() {\n\t\t<-cSignal\n\t\tfmt.Fprintf(out, \"Release %s has been cancelled.\\n\", args[0])","sourceCodeStart":312,"sourceCodeEnd":348,"githubUrl":"https://github.com/helm/helm/blob/2a29f1770b62844b27197d2507377361d45ad7c0/pkg/cmd/install.go#L312-L348","documentation":"Only reachable with --dependency-update: the downloader.Manager rewrote the chart's dependencies on disk, then the CLI reloads the chart with loader.Load(cp) (pkg/cmd/install.go:327-330). That reload failed, meaning the freshly updated dependency state is not a loadable chart — broken downloaded tarball, unexpected file layout, or concurrent modification of the chart directory.","triggerScenarios":"`helm install --dependency-update` where a dependency resolves to a corrupted/malformed tgz; the chart directory is modified by another process between update and reload; disk-full produces a truncated charts/*.tgz.","commonSituations":"Flaky or proxied chart mirrors serving partial downloads; parallel CI jobs sharing a chart checkout; filesystem issues truncating the downloaded archive.","solutions":["Delete charts/ and Chart.lock in the chart and re-run `helm dependency update` from scratch","Inspect the wrapped loader error to identify which file/archive failed to load","Verify the dependency repositories are healthy (manual `helm pull` of the dependency) and check disk space"],"exampleFix":"# before\nhelm install myrel ./chart --dependency-update\n# error: failed reloading chart after repo update: ...\n\n# after\nrm -rf ./chart/charts ./chart/Chart.lock\nhelm dependency update ./chart\nhelm install myrel ./chart","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := runInstall(args); err != nil {\n    if strings.Contains(err.Error(), \"failed reloading chart after repo update\") {\n        // dependency state on disk is not loadable: clean and rebuild from scratch\n        os.RemoveAll(filepath.Join(chartPath, \"charts\"))\n        os.Remove(filepath.Join(chartPath, \"Chart.lock\"))\n        return errors.New(\"chart deps corrupted after update; cleaned charts/ and Chart.lock, re-run helm dependency update\")\n    }\n    return err\n}","preventionTips":["Do not share one chart checkout between parallel builds that both run --dependency-update","Verify dependency tarballs after fetch (helm pull + tar -tf) when using mirrored repos","Keep the chart directory on a healthy local filesystem"],"tags":["charts","dependencies","packaging","install"],"backgroundTag":null,"analyzedSha":"2a29f1770b62844b27197d2507377361d45ad7c0","analyzedAt":"2026-08-15T22:02:47.490Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}