netbirdio/netbird · error

add status file to zip: %w

Error message

add status file to zip: %w

What it means

Returned by BundleGenerator.addStatus in client/internal/debug/debug.go:554 when addFileToZip fails writing status.txt. The status output string is built entirely in memory (ConvertToStatusOutputOverview + FullDetailSummary), so this error wraps either 'create zip file header' or 'write file to zip' from the shared addFileToZip helper, i.e. an I/O failure on the bundle temp file. It propagates up as 'add status: %w' and aborts generation.

Source

Thrown at client/internal/debug/debug.go:554

		if g.refreshStatus != nil {
			g.refreshStatus()
		}

		fullStatus := g.statusRecorder.GetFullStatus()
		protoFullStatus := nbstatus.ToProtoFullStatus(fullStatus)
		overview := nbstatus.ConvertToStatusOutputOverview(protoFullStatus, nbstatus.ConvertOptions{
			Anonymize:      g.anonymize,
			AnonymizeLevel: g.anonymizeLevel,
			ProfileName:    profName,
			DaemonVersion:  g.daemonVersion,
		})
		overview.CliVersion = g.cliVersion
		statusOutput := overview.FullDetailSummary()

		statusReader := strings.NewReader(statusOutput)
		if err := g.addFileToZip(statusReader, "status.txt"); err != nil {
			return fmt.Errorf("add status file to zip: %w", err)
		}
		seedFromStatus(g.anonymizer, &fullStatus)
	} else {
		log.Debugf("no status recorder available for seeding")
	}
	return nil
}

func (g *BundleGenerator) addConfig() error {
	if g.internalConfig == nil {
		log.Debug("skipping empty config in debug bundle")
		return nil
	}

	var configContent strings.Builder
	g.addCommonConfigFields(&configContent)

	if g.anonymize {

View on GitHub (pinned to 93e97f4bf1)

Solutions

  1. Free space on the temp filesystem and retry.
  2. Configure BundleDeps.TempDir to a volume with enough free space.
  3. Reduce optional heavy inputs (capture file, many log files) so the mandatory entries fit on the volume.
Defensive patterns

Strategy: retry

Try / catch

// Go: status content is in-memory; treat failure as disk I/O
if err := gen.Generate(); err != nil && strings.Contains(err.Error(), "add status file to zip") {
    // free temp space and retry once
}

Prevention

When it happens

Trigger: Bundle generation while the zip entry write for status.txt fails: no space left on the temp filesystem, read-only filesystem, or the temp file handle invalidated under the writer.

Common situations: Peers with full disks or small tmpfs mounts; debug bundles attempted after large log/capture collection already consumed the remaining space; containerized agents with tight /tmp limits.

Related errors


AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16). Data as JSON: /api/errors/02e19367d437d666. Report an issue: GitHub.