netbirdio/netbird · warning
value parameter is required
Error message
value parameter is required
What it means
The debug performance endpoint GET /debug/perf requires a ?value= query parameter: the number of preallocated buffers per pool pushed to every client via nbembed SetPerformance. An absent or empty value is rejected with 400 before any parsing happens.
Source
Thrown at proxy/internal/debug/handler.go:709
if err := client.Stop(ctx); err != nil {
h.writeJSON(w, map[string]any{
"success": false,
"error": err.Error(),
})
return
}
h.writeJSON(w, map[string]any{
"success": true,
"message": "client stopped",
})
}
func (h *Handler) handlePerf(w http.ResponseWriter, r *http.Request) {
raw := r.URL.Query().Get("value")
if raw == "" {
http.Error(w, "value parameter is required", http.StatusBadRequest)
return
}
n, err := strconv.ParseUint(raw, 10, 32)
if err != nil {
http.Error(w, fmt.Sprintf("invalid value %q: %v", raw, err), http.StatusBadRequest)
return
}
capN := uint32(n)
applied := 0
failed := map[string]string{}
for accountID, client := range h.provider.ListClientsForStartup() {
if err := client.SetPerformance(nbembed.Performance{PreallocatedBuffersPerPool: &capN}); err != nil {
failed[string(accountID)] = err.Error()
continue
}
applied++
}View on GitHub (pinned to 93e97f4bf1)
Solutions
- Add the parameter: GET /debug/perf?value=1024
- Use a plain base-10 integer that fits in uint32 (0 to 4294967295)
- If scripted, build the URL with a query encoder so value is never lost
Example fix
// before curl http://<proxy-debug>/debug/perf // after curl 'http://<proxy-debug>/debug/perf?value=1024'
Defensive patterns
Strategy: validation
Validate before calling
q := url.Values{}
q.Set("value", strconv.FormatUint(uint64(buffersPerPool), 10))
reqURL := debugBase + "/debug/perf?" + q.Encode() // value can never be missing Prevention
- Build debug URLs with url.Values so parameters are always present and encoded
- Keep a named constant for the value parameter in scripts instead of string concatenation
When it happens
Trigger: GET /debug/perf with no value parameter at all, or value= (empty string), e.g. after a script dropped the query string during URL construction.
Common situations: Calling /debug/perf like the parameter-less /debug/runtime endpoint; URL encoding that strips the query string; assuming value is optional with a server-side default.
Related errors
- invalid value %q: %v
- invalid duration: {}
- duration must not be negative
- client not found
- host argument required
AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16).
Data as JSON: /api/errors/3a090b50c2a26cc0.
Report an issue: GitHub.