[GH-ISSUE #365] Display better error message #261

Closed
opened 2026-03-01 21:41:52 +03:00 by kerem · 1 comment
Owner

Originally created by @NiciusB on GitHub (Sep 10, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/365

Hi! I was trying to use act without having Docker installed in my computer, and was getting weird errors like

panic: runtime error: index out of range [1] with length 0

goroutine 6 [running]:
github.com/nektos/act/pkg/runner.newRemoteAction(0x0, 0x0, 0x0)
        /home/runner/work/act/act/pkg/runner/step_context.go:361 +0x1a9
github.com/nektos/act/pkg/runner.(*githubContext).isLocalCheckout(0xc0004441e0, 0xc00042a090, 0x5)
        /home/runner/work/act/act/pkg/runner/run_context.go:422 +0x53
github.com/nektos/act/pkg/runner.(*RunContext).localCheckoutPath(0xc00042a630, 0xc00048e3a0, 0xc0000355e0, 0x1b)
        /home/runner/work/act/act/pkg/runner/run_context.go:507 +0xbe
github.com/nektos/act/pkg/runner.(*RunContext).startJobContainer.func1(0x1a21800, 0xc000465da0, 0x0, 0x0)
        /home/runner/work/act/act/pkg/runner/run_context.go:113 +0xe0b
github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xffffffffffffffff, 0xc0004949f8)
        /home/runner/work/act/act/pkg/common/executor.go:146 +0x17a
github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xc00003a860, 0x0)
        /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xd, 0x10)
        /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0x10, 0x0)
        /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xd, 0xc000494c00)
        /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xc000494c68, 0xc00003a860)
        /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xc0004861a0, 0x10122fe)
        /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0x17f3f00, 0xc00040a690)
        /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0x17b3b40, 0x1a2bfc0)
        /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0x1, 0x1f837f8)
        /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.If.func1(0x1a21800, 0xc000465da0, 0xc000035540, 0x17)
        /home/runner/work/act/act/pkg/common/executor.go:154 +0x6a
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1(0x1a21800, 0xc00040a6c0, 0xc00048e040, 0xc000076f70)
        /home/runner/work/act/act/pkg/runner/runner.go:78 +0x24b
github.com/nektos/act/pkg/common.Executor.ChannelError.func1(0x1a21800, 0xc00040a6c0, 0xc00048e040, 0x0)
        /home/runner/work/act/act/pkg/common/executor.go:125 +0x45
github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0xc00048e000, 0xc000420240, 0x1a21800, 0xc00040a6c0)
        /home/runner/work/act/act/pkg/common/executor.go:101 +0x56
created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1
        /home/runner/work/act/act/pkg/common/executor.go:100 +0xb7

Turns out I just had to install Docker. I know it's mentioned in the README, but not specifically in the Installation section, and the errors weren't particularly helpful.

I believe showing a nice error message would be helpful for new users.

Thanks!

Originally created by @NiciusB on GitHub (Sep 10, 2020). Original GitHub issue: https://github.com/nektos/act/issues/365 Hi! I was trying to use `act` without having Docker installed in my computer, and was getting weird errors like ``` panic: runtime error: index out of range [1] with length 0 goroutine 6 [running]: github.com/nektos/act/pkg/runner.newRemoteAction(0x0, 0x0, 0x0) /home/runner/work/act/act/pkg/runner/step_context.go:361 +0x1a9 github.com/nektos/act/pkg/runner.(*githubContext).isLocalCheckout(0xc0004441e0, 0xc00042a090, 0x5) /home/runner/work/act/act/pkg/runner/run_context.go:422 +0x53 github.com/nektos/act/pkg/runner.(*RunContext).localCheckoutPath(0xc00042a630, 0xc00048e3a0, 0xc0000355e0, 0x1b) /home/runner/work/act/act/pkg/runner/run_context.go:507 +0xbe github.com/nektos/act/pkg/runner.(*RunContext).startJobContainer.func1(0x1a21800, 0xc000465da0, 0x0, 0x0) /home/runner/work/act/act/pkg/runner/run_context.go:113 +0xe0b github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xffffffffffffffff, 0xc0004949f8) /home/runner/work/act/act/pkg/common/executor.go:146 +0x17a github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xc00003a860, 0x0) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xd, 0x10) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0x10, 0x0) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xd, 0xc000494c00) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xc000494c68, 0xc00003a860) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0xc0004861a0, 0x10122fe) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0x17f3f00, 0xc00040a690) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0x17b3b40, 0x1a2bfc0) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0x1a21800, 0xc000465da0, 0x1, 0x1f837f8) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.If.func1(0x1a21800, 0xc000465da0, 0xc000035540, 0x17) /home/runner/work/act/act/pkg/common/executor.go:154 +0x6a github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1(0x1a21800, 0xc00040a6c0, 0xc00048e040, 0xc000076f70) /home/runner/work/act/act/pkg/runner/runner.go:78 +0x24b github.com/nektos/act/pkg/common.Executor.ChannelError.func1(0x1a21800, 0xc00040a6c0, 0xc00048e040, 0x0) /home/runner/work/act/act/pkg/common/executor.go:125 +0x45 github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0xc00048e000, 0xc000420240, 0x1a21800, 0xc00040a6c0) /home/runner/work/act/act/pkg/common/executor.go:101 +0x56 created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1 /home/runner/work/act/act/pkg/common/executor.go:100 +0xb7 ``` Turns out I just had to install Docker. I know it's mentioned in the README, but not specifically in the Installation section, and the errors weren't particularly helpful. I believe showing a nice error message would be helpful for new users. Thanks!
kerem closed this issue 2026-03-01 21:41:52 +03:00
Author
Owner

@NiciusB commented on GitHub (Sep 10, 2020):

Nevermind. Turns out I had something weird on my worfklow yaml file (putting -names where I wasn't supposed to), and it was breaking

<!-- gh-comment-id:690659238 --> @NiciusB commented on GitHub (Sep 10, 2020): Nevermind. Turns out I had something weird on my worfklow yaml file (putting -names where I wasn't supposed to), and it was breaking
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#261
No description provided.