{"record":{"id":"9457894eba529335","repo":"nektos/act","slug":"failed-to-parse-s","errorCode":null,"errorMessage":"Failed to parse: %s","messagePattern":"Failed to parse: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/exprparser/interpreter.go","lineNumber":89,"sourceCode":"\tconfig Config\n}\n\nfunc NewInterpeter(env *EvaluationEnvironment, config Config) Interpreter {\n\treturn &interperterImpl{\n\t\tenv:    env,\n\t\tconfig: config,\n\t}\n}\n\nfunc (impl *interperterImpl) Evaluate(input string, defaultStatusCheck DefaultStatusCheck) (interface{}, error) {\n\tinput = strings.TrimPrefix(input, \"${{\")\n\tif defaultStatusCheck != DefaultStatusCheckNone && input == \"\" {\n\t\tinput = \"success()\"\n\t}\n\tparser := actionlint.NewExprParser()\n\texprNode, err := parser.Parse(actionlint.NewExprLexer(input + \"}}\"))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Failed to parse: %s\", err.Message)\n\t}\n\n\tif defaultStatusCheck != DefaultStatusCheckNone {\n\t\thasStatusCheckFunction := false\n\t\tactionlint.VisitExprNode(exprNode, func(node, _ actionlint.ExprNode, entering bool) {\n\t\t\tif funcCallNode, ok := node.(*actionlint.FuncCallNode); entering && ok {\n\t\t\t\tswitch strings.ToLower(funcCallNode.Callee) {\n\t\t\t\tcase \"success\", \"always\", \"cancelled\", \"failure\":\n\t\t\t\t\thasStatusCheckFunction = true\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tif !hasStatusCheckFunction {\n\t\t\texprNode = &actionlint.LogicalOpNode{\n\t\t\t\tKind: actionlint.LogicalOpNodeKindAnd,\n\t\t\t\tLeft: &actionlint.FuncCallNode{\n\t\t\t\t\tCallee: defaultStatusCheck.String(),","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/exprparser/interpreter.go#L71-L107","documentation":"Thrown when an expression references the 'jobs' context but impl.env.Jobs is nil. act only populates the jobs context in specific positions (outputs of reusable-workflow callers / workflow-level expressions); elsewhere it is unavailable and this error fires instead of returning empty data.","triggerScenarios":"Using jobs.<id>.outputs or jobs.<id>.result in a place act does not support (e.g. inside a reusable workflow's own steps, or a run where the jobs env was never wired up); referencing jobs in a locally triggered event that GitHub itself would not populate it for.","commonSituations":"Reusable workflows evaluated locally with act; expressions valid on github.com but hitting act's unsupported paths; typo'd context names that fall through to the generic unavailable-context case only when spelled 'jobs'.","solutions":["Access jobs.* only where GitHub documents it (workflow-level outputs wiring, caller-side expressions).","Pass values explicitly via outputs/inputs instead of reading the jobs context downstream.","Update act — jobs-context support for reusable workflows has improved across versions.","If unsupported in act, guard with a contains-style check or move logic to the caller workflow."],"exampleFix":"# before (inside reusable workflow step)\nrun: echo ${{ jobs.build.outputs.img }}\n# after (wire through outputs)\njobs:\n  build:\n    outputs:\n      img: ${{ steps.b.out }}\n  call:\n    uses: ./.github/workflows/child.yml","handlingStrategy":"validation","validationCode":"func jobsContextAvailable(env *exprparser.ExpressionEnvLoading) bool {\n  return env.Jobs != nil // mirror the interpreter's own nil check\n}","typeGuard":null,"tryCatchPattern":"if v, err := interp.Evaluate('${{ jobs.build.result }}', 0); err != nil {\n  if strings.Contains(err.Error(), 'Unavailable context: jobs') {\n    v = 'skipped' // not a caller-side evaluation: use a default\n  } else { return err }\n}","preventionTips":["Read jobs.* only in caller workflows / output wiring","Pass reusable-workflow results through outputs, not the jobs context downstream","Keep act updated for reusable-workflow context support"],"tags":["expressions","jobs-context","reusable-workflows","unsupported-feature"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}