netbirdio/netbird · error
fouldn't get fileInfo;
Error message
fouldn't get fileInfo; %v
What it means
os.Stat failed on an entry that os.ReadDir had just listed during recursive directory copy (cpDir, used by rebranding). Usually a race where the entry disappeared mid-copy, or a permission problem on the path. Note the misspelled 'fouldn't' in the source.
Solutions
- Re-run the rebrand/copy operation; a vanished temp entry usually succeeds on retry
- Check permissions on the source tree
- Verify the source directory is stable (not being modified concurrently)
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at client/cmd/root.go:404 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16).
Data as JSON: /api/errors/8b7fc1a33b619e60.
Report an issue: GitHub.
Appendix: source
Thrown at client/cmd/root.go:404
if srcinfo, err = os.Stat(src); err != nil {
return err
}
if err = os.MkdirAll(dst, srcinfo.Mode()); err != nil {
return err
}
if fds, err = os.ReadDir(src); err != nil {
return err
}
for _, fd := range fds {
srcfp := path.Join(src, fd.Name())
dstfp := path.Join(dst, fd.Name())
fileInfo, err := os.Stat(srcfp)
if err != nil {
return fmt.Errorf("fouldn't get fileInfo; %v", err)
}
switch fileInfo.Mode() & os.ModeType {
case os.ModeSymlink:
if err = copySymLink(srcfp, dstfp); err != nil {
return fmt.Errorf("failed to copy from %s to %s; %v", srcfp, dstfp, err)
}
case os.ModeDir:
if err = cpDir(srcfp, dstfp); err != nil {
return fmt.Errorf("failed to copy from %s to %s; %v", srcfp, dstfp, err)
}
default:
if err = cpFile(srcfp, dstfp); err != nil {
return fmt.Errorf("failed to copy from %s to %s; %v", srcfp, dstfp, err)
}
}
}
return nilView on GitHub (pinned to 93e97f4bf1)