helm: helm template throws panic: runtime error: invalid memory address or nil pointer dereference
Output of helm version:
[root@localhost scm]# podman run -it registry.gitlab.com/xrow-public/ci-tools/helm:3.0 helm version W1018 22:46:08.571509 1 loader.go:221] Config not found: /root/.kube/config version.BuildInfo{Version:“v3.7.1”, GitCommit:“1d11fcb5d3f3bf00dbe6fe31b8412839a96b3dc4”, GitTreeState:“clean”, GoVersion:“go1.16.9”}
Output of kubectl version:
[root@localhost scm]# podman run -it registry.gitlab.com/xrow-public/ci-tools/helm:3.0 kubectl version Client Version: version.Info{Major:“1”, Minor:“13+”, GitVersion:“v1.13.4+af45cda”, GitCommit:“af45cda”, GitTreeState:“clean”, BuildDate:“2019-04-10T12:24:28Z”, GoVersion:“go1.10.3”, Compiler:“gc”, Platform:“linux/amd64”}
Cloud Provider/Platform (AKS, GKE, Minikube etc.):
OpenShift 3.11
When running the command helm template $CHARTDIR -f $test --debug --dependency-update; on a chart with oci and non oci dependencies i get this error.
Testing Chart Template: ./chart/charts/kube-state-metrics/Chart.yaml Testing Chart Template: ./chart/Chart.yaml W1019 08:00:40.751208 19 loader.go:221] Config not found: /root/.kube/config install.go:178: [debug] Original chart version: “” install.go:199: [debug] CHART PATH: /builds/xrow-shared/helm-ezplatform/chart Getting updates for unmanaged Helm repositories… …Unable to get an update from the “oci://registry.gitlab.com/xrow-public/helm-smtp” chart repository: object required …Unable to get an update from the “oci://registry.gitlab.com/xrow-public/helm-varnish” chart repository: object required …Unable to get an update from the “oci://registry.gitlab.com/xrow-public/helm-iframely” chart repository: object required …Successfully got an update from the “https://charts.preferred.ai” chart repository …Successfully got an update from the “https://apache.jfrog.io/artifactory/tika” chart repository …Successfully got an update from the “https://charts.helm.sh/stable” chart repository …Successfully got an update from the “https://charts.bitnami.com/bitnami” chart repository …Successfully got an update from the “https://charts.bitnami.com/bitnami” chart repository …Successfully got an update from the “https://charts.bitnami.com/bitnami” chart repository Saving 11 charts Downloading smtp from repo oci://registry.gitlab.com/xrow-public/helm-smtp panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x185b0da] goroutine 1 [running]: helm.sh/helm/v3/internal/experimental/registry.(*Client).Pull(0x0, 0xc000dba100, 0x34, 0x0, 0x0, 0x0, 0x34, 0xc00badf260, 0x44f0a5) helm.sh/helm/v3/internal/experimental/registry/client.go:235 +0x21a helm.sh/helm/v3/pkg/getter.(*OCIGetter).get(0xc002e5adc0, 0xc000dba000, 0x34, 0xc00badf2f8, 0xc000dba000, 0x34) helm.sh/helm/v3/pkg/getter/ocigetter.go:57 +0x23b helm.sh/helm/v3/pkg/getter.(*OCIGetter).Get(0xc002e5adc0, 0xc000dba000, 0x34, 0xc001bd6300, 0x7, 0x8, 0xc002e5adc0, 0x0, 0x0) helm.sh/helm/v3/pkg/getter/ocigetter.go:36 +0x77 helm.sh/helm/v3/pkg/downloader.(*ChartDownloader).DownloadTo(0xc00badf718, 0xc001bcff80, 0x34, 0xc001bcffb5, 0x5, 0xc001bcfe80, 0x33, 0x8, 0x0, 0x0, …) helm.sh/helm/v3/pkg/downloader/chart_downloader.go:99 +0x142 helm.sh/helm/v3/pkg/downloader.(*Manager).downloadAll(0xc0001b9440, 0xc00071e240, 0xb, 0xb, 0x0, 0x0) helm.sh/helm/v3/pkg/downloader/manager.go:360 +0xd95 helm.sh/helm/v3/pkg/downloader.(*Manager).Update(0xc0001b9440, 0xc0001b9440, 0xb) helm.sh/helm/v3/pkg/downloader/manager.go:201 +0x1b7 main.runInstall(0xc0007162d0, 0x1, 0x5, 0xc0000e2840, 0xc00030ca80, 0x2211100, 0xc00000e018, 0x4acaca, 0x1f841e3, 0xa) helm.sh/helm/v3/cmd/helm/install.go:237 +0x6dc main.newTemplateCmd.func2(0xc00021d680, 0xc0007162d0, 0x1, 0x5, 0x0, 0x0) helm.sh/helm/v3/cmd/helm/template.go:82 +0x146 github.com/spf13/cobra.(*Command).execute(0xc00021d680, 0xc000716280, 0x5, 0x5, 0xc00021d680, 0xc000716280) github.com/spf13/cobra@v1.2.1/command.go:856 +0x472 github.com/spf13/cobra.(*Command).ExecuteC(0xc0003faf00, 0xc000720230, 0x1, 0xc0005a3f60) github.com/spf13/cobra@v1.2.1/command.go:974 +0x375 github.com/spf13/cobra.(*Command).Execute(…) github.com/spf13/cobra@v1.2.1/command.go:902 main.main() helm.sh/helm/v3/cmd/helm/helm.go:87 +0x27b
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 3
- Comments: 19 (3 by maintainers)
Commits related to this issue
- Fix SIGSEGV by adding OCI RegistryClient args Fixes #10246 WIP: Need to add unit tests, need to add args to newPackage in cmd/helm/package_test.go — committed to mbarrien/helm by mbarrien 3 years ago
- Fix SIGSEGV by adding OCI RegistryClient args Fixes #10246 WIP: Need to add unit tests, need to add args to newPackage in cmd/helm/package_test.go — committed to mbarrien/helm by mbarrien 3 years ago
- Fix SIGSEGV by adding OCI RegistryClient args Fixes #10246 WIP: Need to add unit tests, need to add args to newPackage in cmd/helm/package_test.go — committed to mbarrien/helm by mbarrien 3 years ago
- Fix SIGSEGV by adding OCI RegistryClient args Fixes #10246 WIP: Need to add unit tests, need to add args to newPackage in cmd/helm/package_test.go Signed-off-by: Michael Barrientos <mbarrien@cal.be... — committed to mbarrien/helm by mbarrien 3 years ago
- Fix SIGSEGV by adding OCI RegistryClient args Fixes #10246 WIP: Need to add unit tests, need to add args to newPackage in cmd/helm/package_test.go Signed-off-by: Michael Barrientos <mbarrien@cal.be... — committed to mbarrien/helm by mbarrien 3 years ago
- Fix SIGSEGV by adding OCI RegistryClient args Fixes #10246 WIP: Need to add unit tests, need to add args to newPackage in cmd/helm/package_test.go Signed-off-by: Michael Barrientos <mbarrien@cal.be... — committed to mbarrien/helm by mbarrien 3 years ago
@yxxhero you already asked for PR and @mbarrien provided one but did not find any support from the project side.
keep alive, any progress on this?
Hi I am getting the same error when trying to package a chart that has a dependency stored in AWS ECR. Chart.yaml:
Error when running
helm package my-service/ -u:I am using the latest Helm version:
version.BuildInfo{Version:"v3.7.1", GitCommit:"1d11fcb5d3f3bf00dbe6fe31b8412839a96b3dc4", GitTreeState:"clean", GoVersion:"go1.17.2"}