Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to fetch chart info #56

Closed
philbo opened this issue Apr 1, 2021 · 4 comments
Closed

Failed to fetch chart info #56

philbo opened this issue Apr 1, 2021 · 4 comments

Comments

@philbo
Copy link
Contributor

philbo commented Apr 1, 2021

Hi,

I'm getting multiple errors when running helm-exporter:0.6.2

time="2021-04-01T14:38:23Z" level=error msg="Failed to fetch chart info" chart=nginx-ingress error="invalid character '<' looking for beginning of value"
time="2021-04-01T14:38:23Z" level=error msg="Failed to fetch chart info" chart=pgbouncer error="invalid character '<' looking for beginning of value"
time="2021-04-01T14:38:23Z" level=error msg="Failed to fetch chart info" chart=cloudsql-proxy error="invalid character '<' looking for beginning of value"
time="2021-04-01T14:38:23Z" level=error msg="Failed to fetch chart info" chart=flux error="invalid character '<' looking for beginning of value"
time="2021-04-01T14:38:23Z" level=error msg="Failed to fetch chart info" chart=helm-operator error="invalid character '<' looking for beginning of value"
time="2021-04-01T14:38:23Z" level=error msg="Failed to fetch chart info" chart=kubernetes-dashboard error="invalid character '<' looking for beginning of value"

My guess is that the response from findChart is not JSON as expected, but probably some kind of HTML response.

Any suggestions as to how to debug or fix the error?

@sstarcher
Copy link
Owner

One option would be to disable fetch latest and it would not attempt to query.

@sstarcher
Copy link
Owner

Looks like it moved and it's seeing a redirect instead. The URL in the code would need updated. Overall it would be much

❯ curl 'https://hub.helm.sh/api/chartsvc/v1/charts/search?q=nginx-ingress'
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
</body>
</html>
❯ curl 'https://artifacthub.io/api/chartsvc/v1/charts/search?q=nginx-ingress'
{"data":[{"id":"nginx/nginx-ingress","artifactHub":{"packageUrl":"https://artifacthub.io/packages/helm/nginx/nginx-ingress"},"attributes":{"description":"NGINX Ingress Controller","repo":{"name":"nginx","url":"https://helm.nginx.com/stable"}},"relationships":{"latestChartVersion":{"data":{"version":"0.9.0","app_version":"1.11.0"}}}},{"id":"nginx-edge/nginx-ingress","artifactHub":{"packageUrl":"https://artifacthub.io/packages/helm/nginx-edge/nginx-ingress"},"attributes":{"description":"NGINX Ingress Controller","repo":{"name":"nginx-edge","url":"https://helm.nginx.com/edge"}},"relationships":{"latestChartVersion":{"data":{"version":"0.0.0-edge","app_version":"edge"}}}},{"id":"hkube/nginx-ingress","artifactHub":{"packageUrl":"https://artifacthub.io/packages/helm/hkube/nginx-ingress"},"attributes":{"description":"An nginx Ingress controller that uses ConfigMap to store the nginx configuration.","repo":{"name":"hkube","url":"https://hkube.io/helm/"}},"relationships":{"latestChartVersion":{"data":{"version":"1.31.1002","app_version":"0.29.0"}}}},{"id":"cloudposse/nginx-ingress","artifactHub":{"packageUrl":"https://artifacthub.io/packages/helm/cloudposse/nginx-ingress"},"attributes":{"description":"A Helm chart for Nginx Ingress","repo":{"name":"cloudposse","url":"https://charts.cloudposse.com/incubator/"}},"relationships":{"latestChartVersion":{"data":{"version":"0.1.8"}}}},{"id":"cloudposse/nginx-default-backend","artifactHub":{"packageUrl":"https://artifacthub.io/packages/helm/cloudposse/nginx-default-backend"},"attributes":{"description":"A Helm chart for nginx-default-backend to be used by nginx-ingress controller","repo":{"name":"cloudposse","url":"https://charts.cloudposse.com/incubator/"}},"relationships":{"latestChartVersion":{"data":{"version":"0.5.0"}}}},{"id":"cloudposse/fail-whale","artifactHub":{"packageUrl":"https://artifacthub.io/packages/helm/cloudposse/fail-whale"},"attributes":{"description":"A Helm chart that provides a maintenance backend to be used by nginx-ingress controller","repo":{"name":"cloudposse","url":"https://charts.cloudposse.com/incubator/"}},"relationships":{"latestChartVersion":{"data":{"version":"0.1.1"}}}}]}%

@philbo
Copy link
Contributor Author

philbo commented Apr 1, 2021

doesn't the http client follow redirects by default? https://golang.org/src/net/http/client.go?s=15281:15329#L435

@sstarcher
Copy link
Owner

0.7.3 should be available

@philbo philbo changed the title Failed to search chart info Failed to fetch chart info Apr 6, 2021
@philbo philbo closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants