{"record":{"id":"02e19367d437d666","repo":"netbirdio/netbird","slug":"add-status-file-to-zip-w","errorCode":null,"errorMessage":"add status file to zip: %w","messagePattern":"add status file to zip: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/internal/debug/debug.go","lineNumber":554,"sourceCode":"\n\t\tif g.refreshStatus != nil {\n\t\t\tg.refreshStatus()\n\t\t}\n\n\t\tfullStatus := g.statusRecorder.GetFullStatus()\n\t\tprotoFullStatus := nbstatus.ToProtoFullStatus(fullStatus)\n\t\toverview := nbstatus.ConvertToStatusOutputOverview(protoFullStatus, nbstatus.ConvertOptions{\n\t\t\tAnonymize:      g.anonymize,\n\t\t\tAnonymizeLevel: g.anonymizeLevel,\n\t\t\tProfileName:    profName,\n\t\t\tDaemonVersion:  g.daemonVersion,\n\t\t})\n\t\toverview.CliVersion = g.cliVersion\n\t\tstatusOutput := overview.FullDetailSummary()\n\n\t\tstatusReader := strings.NewReader(statusOutput)\n\t\tif err := g.addFileToZip(statusReader, \"status.txt\"); err != nil {\n\t\t\treturn fmt.Errorf(\"add status file to zip: %w\", err)\n\t\t}\n\t\tseedFromStatus(g.anonymizer, &fullStatus)\n\t} else {\n\t\tlog.Debugf(\"no status recorder available for seeding\")\n\t}\n\treturn nil\n}\n\nfunc (g *BundleGenerator) addConfig() error {\n\tif g.internalConfig == nil {\n\t\tlog.Debug(\"skipping empty config in debug bundle\")\n\t\treturn nil\n\t}\n\n\tvar configContent strings.Builder\n\tg.addCommonConfigFields(&configContent)\n\n\tif g.anonymize {","sourceCodeStart":536,"sourceCodeEnd":572,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/internal/debug/debug.go#L536-L572","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Free space on the temp filesystem and retry.","Configure BundleDeps.TempDir to a volume with enough free space.","Reduce optional heavy inputs (capture file, many log files) so the mandatory entries fit on the volume."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Go: status content is in-memory; treat failure as disk I/O\nif err := gen.Generate(); err != nil && strings.Contains(err.Error(), \"add status file to zip\") {\n    // free temp space and retry once\n}","preventionTips":["Keep temp storage healthy and non-full.","Regenerate the bundle after disk issues are fixed; content does not need changing."],"tags":["go","netbird","zip","debug-bundle","status","io"],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}