Skip to content

immediate panic after selecting a provider #45

@zswanson

Description

@zswanson

Installed with brew, version 0.1.4
First time run, select either provider from the text menu. Immediate go panic and crash. Running on Mac M1, Monterey.
A colleague has the same issue on an Ubuntu VM running on Windows.

14:36:19 ❯ cloudlens
panic: runtime error: index out of range [0] with length 0 [recovered]
	panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/derailed/tview.(*Application).Run.func1()
	github.com/derailed/tview@v0.7.2/application.go:243 +0x50
panic({0x101dc8c20, 0x14000198390})
	runtime/panic.go:884 +0x204
github.com/one2nc/cloudlens/internal/view.(*App).handleGCP(0x14000c099a0)
	github.com/one2nc/cloudlens/internal/view/app.go:187 +0x648
github.com/one2nc/cloudlens/internal/view.(*App).handleCloudSelection(0x14000c099a0, {0x101518676?, 0x0?})
	github.com/one2nc/cloudlens/internal/view/app.go:227 +0x9c
github.com/one2nc/cloudlens/internal/view.(*App).showCloudSelectionScreen.func2()
	github.com/one2nc/cloudlens/internal/view/app.go:213 +0x2c
github.com/derailed/tview.(*List).InputHandler.func1(0x14000c7a400?, 0x14000794050?)
	github.com/derailed/tview@v0.7.2/list.go:582 +0xa8
github.com/derailed/tview.(*Box).WrapInputHandler.func1(0x140005e8480?, 0xd4ee60?)
	github.com/derailed/tview@v0.7.2/box.go:182 +0x54
github.com/derailed/tview.(*Flex).InputHandler.func1(0x14000c7a200?, 0x14000794040?)
	github.com/derailed/tview@v0.7.2/flex.go:261 +0xd4
github.com/derailed/tview.(*Box).WrapInputHandler.func1(0x14000c2aae0?, 0x1008ca2ec?)
	github.com/derailed/tview@v0.7.2/box.go:182 +0x54
github.com/derailed/tview.(*Flex).InputHandler.func1(0x140001c1f00?, 0x14000794030?)
	github.com/derailed/tview@v0.7.2/flex.go:261 +0xd4
github.com/derailed/tview.(*Box).WrapInputHandler.func1(0x14000c2a990?, 0x10ac87cc8?)
	github.com/derailed/tview@v0.7.2/box.go:182 +0x54
github.com/derailed/tview.(*Pages).InputHandler.func1(0x10?, 0x101c9a6c0?)
	github.com/derailed/tview@v0.7.2/pages.go:332 +0xa8
github.com/derailed/tview.(*Box).WrapInputHandler.func1(0x14000c2a330?, 0x14000d7fb60?)
	github.com/derailed/tview@v0.7.2/box.go:182 +0x54
github.com/derailed/tview.(*Application).Run(0x140000341c0)
	github.com/derailed/tview@v0.7.2/application.go:334 +0x70c
github.com/one2nc/cloudlens/internal/view.(*App).Run(0x14000c099a0)
	github.com/one2nc/cloudlens/internal/view/app.go:296 +0x80
github.com/one2nc/cloudlens/cmd.initView()
	github.com/one2nc/cloudlens/cmd/root.go:57 +0xd0
github.com/one2nc/cloudlens/cmd.run(0x102d9bbe0?, {0x10151bcb2?, 0x0?, 0x0?})
	github.com/one2nc/cloudlens/cmd/root.go:51 +0x1c
github.com/spf13/cobra.(*Command).execute(0x102d9bbe0, {0x140001901d0, 0x0, 0x0})
	github.com/spf13/cobra@v1.6.1/command.go:920 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x102d9bbe0)
	github.com/spf13/cobra@v1.6.1/command.go:1044 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.6.1/command.go:968
github.com/one2nc/cloudlens/cmd.Execute()
	github.com/one2nc/cloudlens/cmd/root.go:44 +0x58
main.main()
	github.com/one2nc/cloudlens/main.go:8 +0x1c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions