nektos/act · error

%sUnknown Property %v

Error message

%sUnknown Property %v

What it means

Validation error from Node.checkMapping (schema.go:388): a mapping key is not found in the schema's Properties for that node, and the mapping does not define a LooseValueType (which would accept any key). Unknown keys are rejected to catch typos and misplaced fields.

Source

Thrown at pkg/schema/schema.go:388

			if insertDirective.MatchString(k.Value) {
				if len(s.Context) == 0 {
					allErrors = errors.Join(allErrors, fmt.Errorf("%sinsert is not allowed here", formatLocation(k)))
				}
				continue
			}

			isExpr, err := s.checkExpression(k)
			if err != nil {
				allErrors = errors.Join(allErrors, err)
				continue
			}
			if isExpr {
				continue
			}
			vdef, ok := def.Mapping.Properties[k.Value]
			if !ok {
				if def.Mapping.LooseValueType == "" {
					allErrors = errors.Join(allErrors, fmt.Errorf("%sUnknown Property %v", formatLocation(k), k.Value))
					continue
				}
				vdef = MappingProperty{Type: def.Mapping.LooseValueType}
			}

			if err := (&Node{
				Definition: vdef.Type,
				Schema:     s.Schema,
				Context:    append(append([]string{}, s.Context...), s.Schema.GetDefinition(vdef.Type).Context...),
			}).UnmarshalYAML(node.Content[i+1]); err != nil {
				allErrors = errors.Join(allErrors, err)
				continue
			}
		}
	}
	return allErrors
}

View on GitHub (pinned to 4f41128141)

Solutions

  1. Check spelling of the key against the schema's documented properties for that mapping
  2. Fix indentation so the key sits under the correct parent mapping
  3. If the key is valid new GitHub syntax, update act / its schema JSON or report an issue

Example fix

# before:
- name: step
  run: echo hi
  envs:
    FOO: bar
# after:
- name: step
  run: echo hi
  env:
    FOO: bar
Defensive patterns

Strategy: validation

Validate before calling

// Optional pre-flight: compare mapping keys against schema properties for known hot spots (with:, env:, job keys)
for _, k := range knownKeys {
    if _, ok := schemaProps[k]; !ok { return fmt.Errorf("key %q not in schema", k) }
}

Try / catch

Fatal validation error — fix the key spelling/placement shown at Line/Column.

Prevention

When it happens

Trigger: Misspelled or misplaced keys: `envs:` instead of `env:`, job-level keys nested under `steps:`, or new GitHub keys absent from act's bundled schema (e.g. a freshly released feature).

Common situations: Typos in with:/env/secrets blocks; keys from newer github.actions syntax than the act schema version; keys nested at the wrong indentation level so they validate under the wrong node.

Related errors


AI-assisted analysis of nektos/act@4f41128141 (2026-08-15). Data as JSON: /api/errors/c404163797bdd348. Report an issue: GitHub.