[GH-ISSUE #1065] panic: reflect: call of reflect.Value.Interface on zero Value #621

Closed
opened 2026-03-01 21:45:00 +03:00 by kerem · 0 comments
Owner

Originally created by @ChristopherHX on GitHub (Mar 21, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1065

System information

act version: f09cdb8443

Expected behaviour

contains(fromjson('{}').m.*.name, '') evaluates to true or false

Actual behaviour

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

Workflow and/or repository

workflow
on: push
jobs:
  testc:
    if: contains(fromjson('{}').m.*.name, '')
    runs-on: ubuntu-latest
    steps:
    - run: echo ${{github.workspace}}

Steps to reproduce

act

act output

Log
time="2022-03-21T20:37:11+01:00" level=debug msg="Loading environment from C:\\Users\\Christopher\\github-actions-act-runner\\act-pr-1056\\.env"
time="2022-03-21T20:37:11+01:00" level=debug msg="Loading secrets from C:\\Users\\Christopher\\github-actions-act-runner\\act-pr-1056\\.secrets"
time="2022-03-21T20:37:11+01:00" level=debug msg="Loading workflow 'C:\\Users\\Christopher\\github-actions-act-runner\\act-pr-1056\\reflect-from-zero.yml'"
time="2022-03-21T20:37:11+01:00" level=debug msg="Reading workflow 'C:\\Users\\Christopher\\github-actions-act-runner\\act-pr-1056\\reflect-from-zero.yml'"
time="2022-03-21T20:37:11+01:00" level=debug msg="Planning event: push"
time="2022-03-21T20:37:11+01:00" level=debug msg="Loading slug from git directory 'C:\\Users\\Christopher\\github-actions-act-runner\\.git'"
time="2022-03-21T20:37:11+01:00" level=debug msg="Loading revision from git directory 'C:\\Users\\Christopher\\github-actions-act-runner\\.git'"
time="2022-03-21T20:37:11+01:00" level=debug msg="Found revision: 58ae37abc6c2244d91822b8ba536aa0a8b829632\n"
time="2022-03-21T20:37:11+01:00" level=debug msg="HEAD points to '58ae37abc6c2244d91822b8ba536aa0a8b829632'"
time="2022-03-21T20:37:11+01:00" level=debug msg="using github ref: refs/heads/main"
time="2022-03-21T20:37:11+01:00" level=debug msg="Found revision: 58ae37abc6c2244d91822b8ba536aa0a8b829632\n"
time="2022-03-21T20:37:11+01:00" level=debug msg="evaluating expression 'contains(fromjson('{}').m.*.name, '')'"
panic: reflect: call of reflect.Value.Interface on zero Value

goroutine 74 [running]:
reflect.valueInterface(0x0, 0x0, 0x0, 0x1, 0x0, 0x0)
        C:/Users/Christopher/Downloads/go/src/reflect/value.go:1021 +0x1ad
reflect.Value.Interface(...)
        C:/Users/Christopher/Downloads/go/src/reflect/value.go:1016
github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateArrayDeref(0xc0004c4060, 0xc00041adf0, 0xc0005e7730, 0x380d7a, 0xc0005e7778, 0x30)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:198 +0xe5
github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateNode(0xc0004c4060, 0xe24b60, 0xc00041adf0, 0xc000426330, 0xc00041c270, 0xc00041c270, 0x0)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:106 +0x52b
github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateObjectDeref(0xc0004c4060, 0xc0005b8420, 0x0, 0x0, 0x0, 0xc0005b8440)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:184 +0x4c
github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateNode(0xc0004c4060, 0xe24ca0, 0xc0005b8420, 0x0, 0xcb24c0, 0x42c999, 0xc0005e7920)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:104 +0x245
github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateFuncCall(0xc0004c4060, 0xc00008dad0, 0xbd6260, 0x127a408, 0x0, 0x0)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:528 +0xc5
github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateNode(0xc0004c4060, 0xe24be0, 0xc00008dad0, 0xbd6260, 0x127a408, 0x0, 0x0)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:114 +0x3b7
github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateLogicalCompare(0xc0004c4060, 0xc00008db30, 0x30, 0xc00008db30, 0xb05395, 0xc000445c00)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:497 +0x135
github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateNode(0xc0004c4060, 0xe24c40, 0xc00008db30, 0x0, 0xc0005e7b68, 0xc0004c2270, 0x27)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:112 +0x2ca
github.com/nektos/act/pkg/exprparser.(*interperterImpl).Evaluate(0xc0004c4060, 0xc000404390, 0x25, 0x1, 0xc0005dfc10, 0x1, 0x1, 0x1)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:82 +0x170
github.com/nektos/act/pkg/runner.expressionEvaluator.evaluate(0xe24a80, 0xc0004c4060, 0xc000404390, 0x25, 0xc0005dfc01, 0xc0005dfca8, 0x37bf2a, 0xcd9be0, 0xd07660)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/runner/expression.go:131 +0xfb
github.com/nektos/act/pkg/runner.EvalBool(0xe33a70, 0xc00041b070, 0xc000404390, 0x25, 0x8, 0xa, 0x2030000)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/runner/expression.go:233 +0x72
github.com/nektos/act/pkg/runner.(*RunContext).isEnabled(0xc00044c240, 0xe36128, 0xc00008d6b0, 0x1ea61460cc8, 0x30, 0x30)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/runner/run_context.go:427 +0xdc
github.com/nektos/act/pkg/runner.(*RunContext).Executor.func1(0xe36128, 0xc00008d6b0, 0x0, 0xc0005dfe58)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/runner/run_context.go:284 +0x4e
github.com/nektos/act/pkg/common.Executor.Finally.func1(0xe36128, 0xc00008d6b0, 0xbdde60, 0xe14470)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/common/executor.go:177 +0x53
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1.1(0xe36128, 0xc0004265a0, 0xd5d601, 0x0)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/runner/runner.go:170 +0x3b0
github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0xe36128, 0xc0004265a0, 0xc0004022a0, 0xc000402300)
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/common/executor.go:102 +0x59
created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1
        C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/common/executor.go:100 +0xd9
exit status 2
Originally created by @ChristopherHX on GitHub (Mar 21, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1065 ## System information `act` version: f09cdb844367189aafe2f3af5795d3136db6b290 ## Expected behaviour `contains(fromjson('{}').m.*.name, '')` evaluates to `true` or `false` ## Actual behaviour ``` panic: reflect: call of reflect.Value.Interface on zero Value ``` ## Workflow and/or repository <details> <summary>workflow</summary> ```none on: push jobs: testc: if: contains(fromjson('{}').m.*.name, '') runs-on: ubuntu-latest steps: - run: echo ${{github.workspace}} ``` </details> ## Steps to reproduce act ## `act` output <details> <summary>Log</summary> ```none time="2022-03-21T20:37:11+01:00" level=debug msg="Loading environment from C:\\Users\\Christopher\\github-actions-act-runner\\act-pr-1056\\.env" time="2022-03-21T20:37:11+01:00" level=debug msg="Loading secrets from C:\\Users\\Christopher\\github-actions-act-runner\\act-pr-1056\\.secrets" time="2022-03-21T20:37:11+01:00" level=debug msg="Loading workflow 'C:\\Users\\Christopher\\github-actions-act-runner\\act-pr-1056\\reflect-from-zero.yml'" time="2022-03-21T20:37:11+01:00" level=debug msg="Reading workflow 'C:\\Users\\Christopher\\github-actions-act-runner\\act-pr-1056\\reflect-from-zero.yml'" time="2022-03-21T20:37:11+01:00" level=debug msg="Planning event: push" time="2022-03-21T20:37:11+01:00" level=debug msg="Loading slug from git directory 'C:\\Users\\Christopher\\github-actions-act-runner\\.git'" time="2022-03-21T20:37:11+01:00" level=debug msg="Loading revision from git directory 'C:\\Users\\Christopher\\github-actions-act-runner\\.git'" time="2022-03-21T20:37:11+01:00" level=debug msg="Found revision: 58ae37abc6c2244d91822b8ba536aa0a8b829632\n" time="2022-03-21T20:37:11+01:00" level=debug msg="HEAD points to '58ae37abc6c2244d91822b8ba536aa0a8b829632'" time="2022-03-21T20:37:11+01:00" level=debug msg="using github ref: refs/heads/main" time="2022-03-21T20:37:11+01:00" level=debug msg="Found revision: 58ae37abc6c2244d91822b8ba536aa0a8b829632\n" time="2022-03-21T20:37:11+01:00" level=debug msg="evaluating expression 'contains(fromjson('{}').m.*.name, '')'" panic: reflect: call of reflect.Value.Interface on zero Value goroutine 74 [running]: reflect.valueInterface(0x0, 0x0, 0x0, 0x1, 0x0, 0x0) C:/Users/Christopher/Downloads/go/src/reflect/value.go:1021 +0x1ad reflect.Value.Interface(...) C:/Users/Christopher/Downloads/go/src/reflect/value.go:1016 github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateArrayDeref(0xc0004c4060, 0xc00041adf0, 0xc0005e7730, 0x380d7a, 0xc0005e7778, 0x30) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:198 +0xe5 github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateNode(0xc0004c4060, 0xe24b60, 0xc00041adf0, 0xc000426330, 0xc00041c270, 0xc00041c270, 0x0) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:106 +0x52b github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateObjectDeref(0xc0004c4060, 0xc0005b8420, 0x0, 0x0, 0x0, 0xc0005b8440) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:184 +0x4c github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateNode(0xc0004c4060, 0xe24ca0, 0xc0005b8420, 0x0, 0xcb24c0, 0x42c999, 0xc0005e7920) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:104 +0x245 github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateFuncCall(0xc0004c4060, 0xc00008dad0, 0xbd6260, 0x127a408, 0x0, 0x0) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:528 +0xc5 github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateNode(0xc0004c4060, 0xe24be0, 0xc00008dad0, 0xbd6260, 0x127a408, 0x0, 0x0) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:114 +0x3b7 github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateLogicalCompare(0xc0004c4060, 0xc00008db30, 0x30, 0xc00008db30, 0xb05395, 0xc000445c00) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:497 +0x135 github.com/nektos/act/pkg/exprparser.(*interperterImpl).evaluateNode(0xc0004c4060, 0xe24c40, 0xc00008db30, 0x0, 0xc0005e7b68, 0xc0004c2270, 0x27) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:112 +0x2ca github.com/nektos/act/pkg/exprparser.(*interperterImpl).Evaluate(0xc0004c4060, 0xc000404390, 0x25, 0x1, 0xc0005dfc10, 0x1, 0x1, 0x1) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/exprparser/interpreter.go:82 +0x170 github.com/nektos/act/pkg/runner.expressionEvaluator.evaluate(0xe24a80, 0xc0004c4060, 0xc000404390, 0x25, 0xc0005dfc01, 0xc0005dfca8, 0x37bf2a, 0xcd9be0, 0xd07660) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/runner/expression.go:131 +0xfb github.com/nektos/act/pkg/runner.EvalBool(0xe33a70, 0xc00041b070, 0xc000404390, 0x25, 0x8, 0xa, 0x2030000) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/runner/expression.go:233 +0x72 github.com/nektos/act/pkg/runner.(*RunContext).isEnabled(0xc00044c240, 0xe36128, 0xc00008d6b0, 0x1ea61460cc8, 0x30, 0x30) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/runner/run_context.go:427 +0xdc github.com/nektos/act/pkg/runner.(*RunContext).Executor.func1(0xe36128, 0xc00008d6b0, 0x0, 0xc0005dfe58) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/runner/run_context.go:284 +0x4e github.com/nektos/act/pkg/common.Executor.Finally.func1(0xe36128, 0xc00008d6b0, 0xbdde60, 0xe14470) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/common/executor.go:177 +0x53 github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1.1(0xe36128, 0xc0004265a0, 0xd5d601, 0x0) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/runner/runner.go:170 +0x3b0 github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0xe36128, 0xc0004265a0, 0xc0004022a0, 0xc000402300) C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/common/executor.go:102 +0x59 created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1 C:/Users/Christopher/github-actions-act-runner/act-pr-1056/pkg/common/executor.go:100 +0xd9 exit status 2 ``` </details>
kerem 2026-03-01 21:45:00 +03:00
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#621
No description provided.