netbirdio/netbird · error
setup login request
Error message
setup login request: %v
What it means
Returned when setupLoginRequest cannot translate the CLI flags into a proto.LoginRequest. That function runs all flag validation: validateNATExternalIPs for --external-ip-map, validateDnsLabels for --extra-dns-labels, parseInterfaceName, and related checks. The wrapped error names the offending value and flag, so the context 'setup login request' just localizes the failure to flag validation before any RPC is made.
Solutions
- Read the inner error: it names the exact flag and expected format (e.g. IP/IP for --external-ip-map)
- Correct or remove the flagged value and re-run
- Run `netbird up --help` to confirm current flag formats
Defensive patterns
Strategy: validation
Validate before calling
// run the same validators the CLI uses, before spawning it
if err := validateNATExternalIPs(externalIPs); err != nil { return err }
if _, err := domain.ValidateDomains(dnsLabels); err != nil { return err } Prevention
- Dry-run flag values through netip.ParseIP / netip.ParseAddrPort / domain.ValidateDomains in scripts
- Keep flag templates per-OS (interface names, utun on macOS)
When it happens
Trigger: `netbird up` with a malformed --external-ip-map entry, an invalid --extra-dns-labels domain, an --interface-name that is non-utun on macOS, or a bad --dns-resolver-address — any error escaping those validators.
Common situations: Copy-pasted flag values from older docs with different accepted formats; scripts templating flag values that end up empty or malformed.
Related errors
- cannot specify both --all flag and state name
- empty string is not a valid input for
- failed to validate dns labels
- invalid interface name
- invalid IP or network interface name not found
AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16).
Data as JSON: /api/errors/b2b25d7310aee173.
Report an issue: GitHub.
Appendix: source
Thrown at client/cmd/up.go:348
}
if err := doDaemonUp(ctx, cmd, client, pm, activeProf, customDNSAddressConverted, username.Username); err != nil {
return fmt.Errorf("daemon up failed: %v", err)
}
cmd.Println("Connected")
return nil
}
func doDaemonUp(ctx context.Context, cmd *cobra.Command, client proto.DaemonServiceClient, pm *profilemanager.ProfileManager, activeProf *profilemanager.Profile, customDNSAddressConverted []byte, username string) error {
providedSetupKey, err := getSetupKey()
if err != nil {
return fmt.Errorf("get setup key: %v", err)
}
loginRequest, err := setupLoginRequest(providedSetupKey, customDNSAddressConverted, cmd)
if err != nil {
return fmt.Errorf("setup login request: %v", err)
}
profileID := activeProf.ID.String()
loginRequest.ProfileName = &profileID
loginRequest.Username = &username
profileState, err := pm.GetProfileState(activeProf.ID)
if err != nil {
log.Debugf("failed to get profile state for login hint: %v", err)
} else if profileState.Email != "" {
loginRequest.Hint = &profileState.Email
}
var loginErr error
var loginResp *proto.LoginResponse
err = WithBackOff(func() error {
var backOffErr errorView on GitHub (pinned to 93e97f4bf1)