[GH-ISSUE #760] Issue: panic: reflect: call of reflect.Value.Type on zero Value #480

Closed
opened 2026-03-01 21:43:46 +03:00 by kerem · 2 comments
Owner

Originally created by @ptrk8 on GitHub (Jul 25, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/760

Originally assigned to: @catthehacker on GitHub.

System information

  • Operating System: Ubuntu 20.10
  • Architecture: x86 64bit
  • Apple M1: no
  • Docker version: 20.10.2,
  • act version: 0.2.23

Expected behaviour

act does not crash when I run the following command:

act --userns <my namespace> release

Actual behaviour

Running act --userns <my namespace> release results in the following error:

panic: reflect: call of reflect.Value.Type on zero Value

goroutine 1 [running]:
reflect.Value.Type(0x0, 0x0, 0x0, 0xc00069f8b0, 0xc0001ae910)
	/opt/hostedtoolcache/go/1.16.5/x64/src/reflect/value.go:1908 +0x189
github.com/nektos/act/pkg/model.(*Job).Matrix(0xc0002f7800, 0x0)
	/home/runner/work/act/act/pkg/model/workflow.go:177 +0xd7
github.com/nektos/act/pkg/model.(*Job).GetMatrixes(0xc0002f7800, 0xc000236b00, 0x19, 0xc0002f7800)
	/home/runner/work/act/act/pkg/model/workflow.go:199 +0x76
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor(0xc000212a50, 0xc000212840, 0x5)
	/home/runner/work/act/act/pkg/runner/runner.go:119 +0x685
github.com/nektos/act/cmd.newRunCommand.func1(0xc000214000, 0xc00025a000, 0x1, 0x9, 0x0, 0x0)
	/home/runner/work/act/act/cmd/root.go:281 +0xc5f
github.com/spf13/cobra.(*Command).execute(0xc000214000, 0xc00024c000, 0x9, 0xc, 0xc000214000, 0xc00024c000)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc000214000, 0x9, 0xc, 0xf)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
github.com/nektos/act/cmd.Execute(0xe70fe0, 0xc0004e2640, 0xe4d8bc, 0x6)
	/home/runner/work/act/act/cmd/root.go:71 +0x100c
main.main()
	/home/runner/work/act/act/main.go:33 +0x175

Workflow and/or repository

workflow
name: Create Packages
on: [release]

jobs:
  Package-Ubuntu-2104-64bit:
    strategy:
      fail-fast: false

    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

Steps to reproduce

  1. Install act
  2. Have your docker daemon use namespaces.
  3. Run a workflow using act -v --userns <namespace> release.

act output

Log
DEBU[0000] Loading environment from /home/phao5814/dev/souffle/souffle-forked/.env
DEBU[0000] Loading secrets from /home/phao5814/dev/souffle/souffle-forked/.secrets
DEBU[0000] Loading workflows from '/home/phao5814/dev/souffle/souffle-forked/.github/workflows'
DEBU[0000] Loading workflows recursively
DEBU[0000] Found workflow 'CI-Tests.yml' in '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/CI-Tests.yml'
DEBU[0000] Found workflow 'cancel.yml' in '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/cancel.yml'
DEBU[0000] Found workflow 'create-packages.yml' in '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/create-packages.yml'
DEBU[0000] Reading workflow '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/CI-Tests.yml'
DEBU[0000] Correcting if statements '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/CI-Tests.yml'
DEBU[0000] Reading workflow '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/cancel.yml'
DEBU[0000] Correcting if statements '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/cancel.yml'
DEBU[0000] Reading workflow '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/create-packages.yml'
DEBU[0000] Correcting if statements '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/create-packages.yml'
DEBU[0000] Planning event: release
panic: reflect: call of reflect.Value.Type on zero Value

goroutine 1 [running]:
reflect.Value.Type(0x0, 0x0, 0x0, 0xc00061f8b0, 0xc0001ae9b0)
	/opt/hostedtoolcache/go/1.16.5/x64/src/reflect/value.go:1908 +0x189
github.com/nektos/act/pkg/model.(*Job).Matrix(0xc0002f7500, 0x0)
	/home/runner/work/act/act/pkg/model/workflow.go:177 +0xd7
github.com/nektos/act/pkg/model.(*Job).GetMatrixes(0xc0002f7500, 0xc0003fc760, 0x19, 0xc0002f7500)
	/home/runner/work/act/act/pkg/model/workflow.go:199 +0x76
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor(0xc00000caf8, 0xc00000c8e8, 0x5)
	/home/runner/work/act/act/pkg/runner/runner.go:119 +0x685
github.com/nektos/act/cmd.newRunCommand.func1(0xc000214000, 0xc00021b900, 0x1, 0xa, 0x0, 0x0)
	/home/runner/work/act/act/cmd/root.go:281 +0xc5f
github.com/spf13/cobra.(*Command).execute(0xc000214000, 0xc00024c000, 0xa, 0xc, 0xc000214000, 0xc00024c000)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc000214000, 0xa, 0xc, 0xf)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
github.com/nektos/act/cmd.Execute(0xe70fe0, 0xc0004e4600, 0xe4d8bc, 0x6)
	/home/runner/work/act/act/cmd/root.go:71 +0x100c
main.main()
	/home/runner/work/act/act/main.go:33 +0x175
Originally created by @ptrk8 on GitHub (Jul 25, 2021). Original GitHub issue: https://github.com/nektos/act/issues/760 Originally assigned to: @catthehacker on GitHub. ## System information <!-- - Operating System: < Windows | Linux | macOS | etc... > - Architecture: < x64 (64-bit) | x86 (32-bit) | arm64 (64-bit) | arm (32-bit) | etc... > - Apple M1: < yes | no > - Docker version: < output of `docker system info -f "{{.ServerVersion}}"` > - Docker image used in `act`: < can be omitted if it's included in log > - `act` version: < output of `act --version`, if you've built `act` yourself, please provide commit hash > --> - Operating System: Ubuntu 20.10 - Architecture: x86 64bit - Apple M1: no - Docker version: 20.10.2, - `act` version: 0.2.23 ## Expected behaviour `act` does not crash when I run the following command: `act --userns <my namespace> release` ## Actual behaviour Running `act --userns <my namespace> release` results in the following error: ``` panic: reflect: call of reflect.Value.Type on zero Value goroutine 1 [running]: reflect.Value.Type(0x0, 0x0, 0x0, 0xc00069f8b0, 0xc0001ae910) /opt/hostedtoolcache/go/1.16.5/x64/src/reflect/value.go:1908 +0x189 github.com/nektos/act/pkg/model.(*Job).Matrix(0xc0002f7800, 0x0) /home/runner/work/act/act/pkg/model/workflow.go:177 +0xd7 github.com/nektos/act/pkg/model.(*Job).GetMatrixes(0xc0002f7800, 0xc000236b00, 0x19, 0xc0002f7800) /home/runner/work/act/act/pkg/model/workflow.go:199 +0x76 github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor(0xc000212a50, 0xc000212840, 0x5) /home/runner/work/act/act/pkg/runner/runner.go:119 +0x685 github.com/nektos/act/cmd.newRunCommand.func1(0xc000214000, 0xc00025a000, 0x1, 0x9, 0x0, 0x0) /home/runner/work/act/act/cmd/root.go:281 +0xc5f github.com/spf13/cobra.(*Command).execute(0xc000214000, 0xc00024c000, 0x9, 0xc, 0xc000214000, 0xc00024c000) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x472 github.com/spf13/cobra.(*Command).ExecuteC(0xc000214000, 0x9, 0xc, 0xf) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x375 github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895 github.com/nektos/act/cmd.Execute(0xe70fe0, 0xc0004e2640, 0xe4d8bc, 0x6) /home/runner/work/act/act/cmd/root.go:71 +0x100c main.main() /home/runner/work/act/act/main.go:33 +0x175 ``` ## Workflow and/or repository <details> <summary>workflow</summary> ```none name: Create Packages on: [release] jobs: Package-Ubuntu-2104-64bit: strategy: fail-fast: false runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 ``` </details> ## Steps to reproduce 1. Install `act` 2. Have your docker daemon use namespaces. 3. Run a workflow using `act -v --userns <namespace> release`. ## `act` output <!-- - Use `act` with `-v`/`--verbose` and paste output from your terminal in code block below --> <details> <summary>Log</summary> ```none DEBU[0000] Loading environment from /home/phao5814/dev/souffle/souffle-forked/.env DEBU[0000] Loading secrets from /home/phao5814/dev/souffle/souffle-forked/.secrets DEBU[0000] Loading workflows from '/home/phao5814/dev/souffle/souffle-forked/.github/workflows' DEBU[0000] Loading workflows recursively DEBU[0000] Found workflow 'CI-Tests.yml' in '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/CI-Tests.yml' DEBU[0000] Found workflow 'cancel.yml' in '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/cancel.yml' DEBU[0000] Found workflow 'create-packages.yml' in '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/create-packages.yml' DEBU[0000] Reading workflow '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/CI-Tests.yml' DEBU[0000] Correcting if statements '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/CI-Tests.yml' DEBU[0000] Reading workflow '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/cancel.yml' DEBU[0000] Correcting if statements '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/cancel.yml' DEBU[0000] Reading workflow '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/create-packages.yml' DEBU[0000] Correcting if statements '/home/phao5814/dev/souffle/souffle-forked/.github/workflows/create-packages.yml' DEBU[0000] Planning event: release panic: reflect: call of reflect.Value.Type on zero Value goroutine 1 [running]: reflect.Value.Type(0x0, 0x0, 0x0, 0xc00061f8b0, 0xc0001ae9b0) /opt/hostedtoolcache/go/1.16.5/x64/src/reflect/value.go:1908 +0x189 github.com/nektos/act/pkg/model.(*Job).Matrix(0xc0002f7500, 0x0) /home/runner/work/act/act/pkg/model/workflow.go:177 +0xd7 github.com/nektos/act/pkg/model.(*Job).GetMatrixes(0xc0002f7500, 0xc0003fc760, 0x19, 0xc0002f7500) /home/runner/work/act/act/pkg/model/workflow.go:199 +0x76 github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor(0xc00000caf8, 0xc00000c8e8, 0x5) /home/runner/work/act/act/pkg/runner/runner.go:119 +0x685 github.com/nektos/act/cmd.newRunCommand.func1(0xc000214000, 0xc00021b900, 0x1, 0xa, 0x0, 0x0) /home/runner/work/act/act/cmd/root.go:281 +0xc5f github.com/spf13/cobra.(*Command).execute(0xc000214000, 0xc00024c000, 0xa, 0xc, 0xc000214000, 0xc00024c000) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x472 github.com/spf13/cobra.(*Command).ExecuteC(0xc000214000, 0xa, 0xc, 0xf) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x375 github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895 github.com/nektos/act/cmd.Execute(0xe70fe0, 0xc0004e4600, 0xe4d8bc, 0x6) /home/runner/work/act/act/cmd/root.go:71 +0x100c main.main() /home/runner/work/act/act/main.go:33 +0x175 ``` </details>
Author
Owner

@ronnetzer commented on GitHub (Jul 26, 2021):

same version, i get the same error when running act -s TOKEN

<!-- gh-comment-id:886815354 --> @ronnetzer commented on GitHub (Jul 26, 2021): same version, i get the same error when running `act -s TOKEN`
Author
Owner

@catthehacker commented on GitHub (Jul 26, 2021):

In some sense it's a duplicate of #625 but since I changed it from map[string]... to interface{} and now it fails at reflecting.

<!-- gh-comment-id:886856605 --> @catthehacker commented on GitHub (Jul 26, 2021): In some sense it's a duplicate of #625 but since I changed it from `map[string]...` to `interface{}` and now it fails at reflecting.
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#480
No description provided.