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

Won't start if api.github.com is inacessable #932

Closed
shopeonarope opened this issue Nov 9, 2020 · 5 comments
Closed

Won't start if api.github.com is inacessable #932

shopeonarope opened this issue Nov 9, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@shopeonarope
Copy link

shopeonarope commented Nov 9, 2020




Describe the bug
k9s won't start when https://api.github.com/repos/derailed/k9s/releases/latest isn't accessible.
It use to work just fine before this version.

4:21PM DBG Fetching latest k9s rev...
4:21PM ERR k9s latest rev fetch failed
4:21PM ERR Boom! runtime error: index out of range [0] with length 0
4:21PM ERR goroutine 1 [running]:
runtime/debug.Stack(0x3322b80, 0x215f903, 0x0)
        runtime/debug/stack.go:24 +0x9f
github.com/derailed/k9s/cmd.run.func1()
        github.com/derailed/k9s/cmd/root.go:75 +0x125
panic(0x2004540, 0xc0007a81e0)
        runtime/panic.go:969 +0x1b9
github.com/derailed/k9s/internal/model.NormalizeVersion(...)
        github.com/derailed/k9s/internal/model/semver.go:43
github.com/derailed/k9s/internal/model.NewSemVer(0x0, 0x0, 0x0)
        github.com/derailed/k9s/internal/model/semver.go:19 +0xdd
github.com/derailed/k9s/internal/model.(*ClusterInfo).Refresh(0xc0006f6630)
        github.com/derailed/k9s/internal/model/cluster_info.go:125 +0x1d3
github.com/derailed/k9s/internal/view.(*App).Init(0xc0006a22a0, 0x2402278, 0x7, 0x2, 0x4, 0x215accb)
        github.com/derailed/k9s/internal/view/app.go:109 +0x706
github.com/derailed/k9s/cmd.run(0x33026a0, 0xc000410bc0, 0x0, 0x1)
        github.com/derailed/k9s/cmd/root.go:84 +0xd1
github.com/spf13/cobra.(*Command).execute(0x33026a0, 0xc00000c070, 0x1, 0x1, 0x33026a0, 0xc00000c070)
        github.com/spf13/cobra@v1.0.0/command.go:846 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x33026a0, 0x0, 0x0, 0x0)
        github.com/spf13/cobra@v1.0.0/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.0.0/command.go:887
github.com/derailed/k9s/cmd.Execute()
        github.com/derailed/k9s/cmd/root.go:66 +0x2d
main.main()
        github.com/derailed/k9s/main.go:28 +0x1f8

To Reproduce
Steps to reproduce the behavior:

  1. Have a very aggressive firewall that blocks connections to https://api.github.com
  2. Run k9s
  3. See BOOM!

Versions (please complete the following information):

  • K9s: v0.23.9
@derailed derailed added the bug Something isn't working label Nov 10, 2020
@micdah
Copy link

micdah commented Nov 10, 2020

Just encountered this bug as well, somehow the rate limit has been exceeded for my IP (which is super weird in itself), resulting in the mentioned url to respond with

{"message":"API rate limit exceeded for X.X.X.X. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://developer.github.com/v3/#rate-limiting"}

Net result being I cannot start k9s! 😢

@sergioatom
Copy link

I concur. I need proxy to access the outside world and if I omit the https_proxy env variable it crashes.

derailed added a commit that referenced this issue Nov 10, 2020
@derailed
Copy link
Owner

@shopeonarope Thank you so much for the heads up on this one! Let see if we're happier on v0.23.10...

@sergioatom
Copy link

Looks good. Thank you for the quick fix and the fantastic job.

@derailed
Copy link
Owner

@sergioatom Cool!! Thank you for reporting back and for your kind words!

placintaalexandru pushed a commit to placintaalexandru/k9s that referenced this issue Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants