{"record":{"id":"12ba9da3664df50b","repo":"nektos/act","slug":"error-occurring-when-resetting-io-pointer-in-s","errorCode":null,"errorMessage":"error occurring when resetting io pointer in '%s': %w","messagePattern":"error occurring when resetting io pointer in '(.+?)': %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/planner.go","lineNumber":138,"sourceCode":"\t\tif ext == \".yml\" || ext == \".yaml\" {\n\t\t\tf, err := os.Open(filepath.Join(wf.dirPath, wf.workflowDirEntry.Name()))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tlog.Debugf(\"Reading workflow '%s'\", f.Name())\n\t\t\tworkflow, err := ReadWorkflow(f, strict)\n\t\t\tif err != nil {\n\t\t\t\t_ = f.Close()\n\t\t\t\tif err == io.EOF {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unable to read workflow '%s': file is empty: %w\", wf.workflowDirEntry.Name(), err)\n\t\t\t\t}\n\t\t\t\treturn nil, fmt.Errorf(\"workflow is not valid. '%s': %w\", wf.workflowDirEntry.Name(), err)\n\t\t\t}\n\t\t\t_, err = f.Seek(0, 0)\n\t\t\tif err != nil {\n\t\t\t\t_ = f.Close()\n\t\t\t\treturn nil, fmt.Errorf(\"error occurring when resetting io pointer in '%s': %w\", wf.workflowDirEntry.Name(), err)\n\t\t\t}\n\n\t\t\tworkflow.File = wf.workflowDirEntry.Name()\n\t\t\tif workflow.Name == \"\" {\n\t\t\t\tworkflow.Name = wf.workflowDirEntry.Name()\n\t\t\t}\n\n\t\t\terr = validateJobName(workflow)\n\t\t\tif err != nil {\n\t\t\t\t_ = f.Close()\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\twp.workflows = append(wp.workflows, workflow)\n\t\t\t_ = f.Close()\n\t\t}\n\t}\n","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/model/planner.go#L120-L156","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"fi, err := entry.Info()\nif err != nil || !fi.Mode().IsRegular() {\n    return fmt.Errorf(\"%s is not a regular file\", entry.Name()) // skip FIFOs/special files\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"resetting io pointer\") {\n    // check mount/filesystem health; retry after remounting or moving the repo to local disk\n}","preventionTips":["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."],"tags":["workflow","planner","seek","rare"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}