netbirdio/netbird · error
add README file to zip: %w
Error message
add README file to zip: %w
What it means
Returned by BundleGenerator.addReadme in client/internal/debug/debug.go:524 when addFileToZip fails for README.txt. addFileToZip fails either at g.archive.CreateHeader ('create zip file header: %w') or at io.Copy into the entry ('write file to zip: %w'). Since the readme is a strings.NewReader of static text, any failure is purely an I/O failure writing to the bundle temp file.
Source
Thrown at client/internal/debug/debug.go:524
if err := g.addSysctls(); err != nil {
log.Errorf("failed to add sysctls to debug bundle: %v", err)
}
if err := g.addDNSInfo(); err != nil {
log.Errorf("failed to add DNS info to debug bundle: %v", err)
}
}
func (g *BundleGenerator) addReadme() error {
level := "none (anonymization disabled)"
if g.anonymize {
level = g.anonymizeLevel.String()
}
header := fmt.Sprintf("Netbird debug bundle\nAnonymization level applied to this bundle: %s\n", level)
readmeReader := strings.NewReader(header + readmeContent)
if err := g.addFileToZip(readmeReader, "README.txt"); err != nil {
return fmt.Errorf("add README file to zip: %w", err)
}
return nil
}
func (g *BundleGenerator) addStatus() error {
if g.statusRecorder != nil {
pm := profilemanager.NewProfileManager()
var profName string
if activeProf, err := pm.GetActiveProfile(); err == nil {
profName = activeProf.Name
}
if g.refreshStatus != nil {
g.refreshStatus()
}
fullStatus := g.statusRecorder.GetFullStatus()
protoFullStatus := nbstatus.ToProtoFullStatus(fullStatus)View on GitHub (pinned to 93e97f4bf1)
Solutions
- Free space on the temp filesystem and retry the bundle.
- Point BundleDeps.TempDir at a writable volume with capacity for logs plus the capture file.
- Restart the daemon if its temp directory was removed while it was running, then retry.
Defensive patterns
Strategy: retry
Try / catch
// Go: the readme is static text, so any failure is I/O
if err := gen.Generate(); err != nil && strings.Contains(err.Error(), "add README file to zip") {
// check disk space on the temp volume, then retry Prevention
- Verify temp filesystem capacity before generating bundles.
- Note the README comes from memory; no input sanitization is needed on your side.
When it happens
Trigger: Any condition where the zip writer cannot write to the os.CreateTemp file: ENOSPC, EROFS, closed file handle, or storage device error, hit while writing the first archive entry.
Common situations: Full /tmp or TMPDIR on the peer; ephemeral or size-limited temp dir in containers; daemon holding a stale temp directory path.
Related errors
AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16).
Data as JSON: /api/errors/30c58f081d433250.
Report an issue: GitHub.