turbot / steampipe

Zero-ETL, infinite possibilities. Live query APIs, code & more with SQL. No DB required.
https://steampipe.io
GNU Affero General Public License v3.0
6.84k stars 264 forks source link

Getting `index out of range [0] with length 0 [recovered]` for CLI initialization #2431

Closed LalitLab closed 1 year ago

LalitLab commented 2 years ago

Describe the bug Got the below error, I am not getting this error every time and occurs once in a while. It happened when I compiled my AWS plugin locally and ran a steampipe query just after that

steampipe-plugin-aws|update-supported-region-checks ⇒  steampipe query
Welcome to Steampipe v0.17.0-alpha.15
For more information, type .help
> select * from aws_dopanic: runtime error: index out of range [0] with length 0 [recovered]
    panic: runtime error: index out of range [0] with length 0

goroutine 25 [running]:
github.com/turbot/steampipe/pkg/interactive.(*InteractiveClient).runInteractivePrompt.func1()
    /Users/lalit/WORK/Turbot/steampipe/steampipe/pkg/interactive/interactive_client.go:199 +0x78
panic({0x105fff9c0, 0x140008fd530})
    /usr/local/go/src/runtime/panic.go:884 +0x204
github.com/c-bata/go-prompt.(*CompletionManager).GetSelectedSuggestion(0x14000564000?)
    /Users/lalit/go/pkg/mod/github.com/turbot/go-prompt@v0.2.6-steampipe.0.20220512154952-8a65716d8171/completion.go:55 +0x118
github.com/c-bata/go-prompt.(*Render).Render(0x14000564000, 0x14000554040, {0x14000d40000, 0x14}, 0x14000560060)
    /Users/lalit/go/pkg/mod/github.com/turbot/go-prompt@v0.2.6-steampipe.0.20220512154952-8a65716d8171/render.go:250 +0x628
github.com/c-bata/go-prompt.(*Prompt).RunCtx(0x14000618000, {0x1060b6ce0, 0x14000554000})
    /Users/lalit/go/pkg/mod/github.com/turbot/go-prompt@v0.2.6-steampipe.0.20220512154952-8a65716d8171/prompt.go:129 +0x618
github.com/turbot/steampipe/pkg/interactive.(*InteractiveClient).runInteractivePrompt(0x140000138c0, {0x1060b6ce0?, 0x14000554000})
    /Users/lalit/WORK/Turbot/steampipe/steampipe/pkg/interactive/interactive_client.go:301 +0x834
github.com/turbot/steampipe/pkg/interactive.(*InteractiveClient).runInteractivePromptAsync.func1()
    /Users/lalit/WORK/Turbot/steampipe/steampipe/pkg/interactive/interactive_client.go:177 +0x30
created by github.com/turbot/steampipe/pkg/interactive.(*InteractiveClient).runInteractivePromptAsync
    /Users/lalit/WORK/Turbot/steampipe/steampipe/pkg/interactive/interactive_client.go:176 +0xac

steampipe-plugin-aws|update-supported-region-checks ⇒  make   

Steampipe version (steampipe -v) Example: v0.17.0-alpha.15

To reproduce Steps to reproduce the behavior (please include relevant code and/or commands).

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

kaidaguerre commented 1 year ago

@LalitTurbot are you still seeing this?

github-actions[bot] commented 1 year ago

'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.'

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 90 days with no activity.