netbirdio/netbird · error

upload debug bundle: %w

Error message

upload debug bundle: %w

What it means

After a bundle is generated, Android DebugBundle calls debug.UploadDebugBundle with a hard 2-minute context timeout to POST the archive to types.DefaultBundleURL (https://upload.debug.netbird.io), tagging it with the management URL. Any transport failure, non-success response, or exceeding 120 seconds is wrapped as this error.

Source

Thrown at client/android/client.go:355

		},
	)

	path, err := bundleGenerator.Generate()
	if err != nil {
		return "", fmt.Errorf("generate debug bundle: %w", err)
	}
	defer func() {
		if err := os.Remove(path); err != nil {
			log.Errorf("failed to remove debug bundle file: %v", err)
		}
	}()

	uploadCtx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
	defer cancel()

	key, err := debug.UploadDebugBundle(uploadCtx, types.DefaultBundleURL, cfg.ManagementURL.String(), path, false)
	if err != nil {
		return "", fmt.Errorf("upload debug bundle: %w", err)
	}

	log.Infof("debug bundle uploaded with key %s", key)
	return key, nil
}

// SetTraceLogLevel configure the logger to trace level
func (c *Client) SetTraceLogLevel() {
	log.SetLevel(log.TraceLevel)
}

// SetInfoLogLevel configure the logger to info level
func (c *Client) SetInfoLogLevel() {
	log.SetLevel(log.InfoLevel)
}

// PeersList return with the list of the PeerInfos
func (c *Client) PeersList() *PeerInfoArray {

View on GitHub (pinned to 93e97f4bf1)

Solutions

  1. Retry the upload once connectivity is restored.
  2. Verify network/firewall access to https://upload.debug.netbird.io.
  3. On persistently slow links, generate the bundle and share the local file instead of relying on the 2-minute upload window.
Defensive patterns

Strategy: retry

Try / catch

key, err := client.DebugBundle(files, true, "anonymize")
if err != nil && strings.HasPrefix(err.Error(), "upload debug bundle:") {
    // network path to upload.debug.netbird.io failed or exceeded 120s:
    // wait for connectivity and retry; the local bundle file still exists
}

Prevention

When it happens

Trigger: Device offline or behind a firewall blocking upload.debug.netbird.io; captive portal intercepting the request; large bundle on a slow link exceeding the 2-minute budget.

Common situations: Support flows triggered exactly when connectivity is broken; corporate egress filtering; metered/slow mobile networks.

Related errors


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