nektos/act · error
error occurring when resetting io pointer in '%s': %w
Error message
error occurring when resetting io pointer in '%s': %w
What it means
Returned when f.Seek(0, 0) fails after a workflow file was successfully read — act rewinds the file descriptor so later consumers can re-read the raw bytes. Seek on a regular file virtually never fails; this error indicates the reader is not a seekable *os.File (unusual injection) or the fd is closed/broken.
Source
Thrown at pkg/model/planner.go:138
if ext == ".yml" || ext == ".yaml" {
f, err := os.Open(filepath.Join(wf.dirPath, wf.workflowDirEntry.Name()))
if err != nil {
return nil, err
}
log.Debugf("Reading workflow '%s'", f.Name())
workflow, err := ReadWorkflow(f, strict)
if err != nil {
_ = f.Close()
if err == io.EOF {
return nil, fmt.Errorf("unable to read workflow '%s': file is empty: %w", wf.workflowDirEntry.Name(), err)
}
return nil, fmt.Errorf("workflow is not valid. '%s': %w", wf.workflowDirEntry.Name(), err)
}
_, err = f.Seek(0, 0)
if err != nil {
_ = f.Close()
return nil, fmt.Errorf("error occurring when resetting io pointer in '%s': %w", wf.workflowDirEntry.Name(), err)
}
workflow.File = wf.workflowDirEntry.Name()
if workflow.Name == "" {
workflow.Name = wf.workflowDirEntry.Name()
}
err = validateJobName(workflow)
if err != nil {
_ = f.Close()
return nil, err
}
wp.workflows = append(wp.workflows, workflow)
_ = f.Close()
}
}
View on GitHub (pinned to 4f41128141)
Solutions
- Ensure .github/workflows contains only regular files (no FIFOs/symlinks to pipes).
- Re-run — if it persists on one machine, check the filesystem health (NFS/FUSE mounts) hosting the repo.
- If embedding act, make sure nothing closes the *os.File between planning phases.
Defensive patterns
Strategy: try-catch
Validate before calling
fi, err := entry.Info()
if err != nil || !fi.Mode().IsRegular() {
return fmt.Errorf("%s is not a regular file", entry.Name()) // skip FIFOs/special files
} Try / catch
if err != nil && strings.Contains(err.Error(), "resetting io pointer") {
// check mount/filesystem health; retry after remounting or moving the repo to local disk
} Prevention
- Keep the repository on a local, fully POSIX filesystem.
- Do not place special files in .github/workflows.
- If embedding act, never pass non-seekable readers into the planner.
When it happens
Trigger: Passing a non-seekable or already-closed file descriptor into the workflow directory scan path; file deleted or fd invalidated between Open and Seek; exotic filesystems that reject seek on an open handle.
Common situations: Almost never seen by end users; mostly reachable in embedded/test contexts where the planner is fed pipes or mock readers, or on flaky NFS/FUSE mounts during CI.
Related errors
- unable to read workflow '%s': file is empty: %w
- workflow is not valid. '%s': %w
- unable to build dependency graph for %s (%s)
- conflicting options: cannot attach both user-defined and non
- Could not find any stages to run. View the valid jobs with `
AI-assisted analysis of nektos/act@4f41128141 (2026-08-15).
Data as JSON: /api/errors/12ba9da3664df50b.
Report an issue: GitHub.