{"record":{"id":"b2b25d7310aee173","repo":"netbirdio/netbird","slug":"setup-login-request-v","errorCode":null,"errorMessage":"setup login request: %v","messagePattern":"setup login request: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/cmd/up.go","lineNumber":348,"sourceCode":"\t}\n\n\tif err := doDaemonUp(ctx, cmd, client, pm, activeProf, customDNSAddressConverted, username.Username); err != nil {\n\t\treturn fmt.Errorf(\"daemon up failed: %v\", err)\n\t}\n\tcmd.Println(\"Connected\")\n\treturn nil\n}\n\nfunc doDaemonUp(ctx context.Context, cmd *cobra.Command, client proto.DaemonServiceClient, pm *profilemanager.ProfileManager, activeProf *profilemanager.Profile, customDNSAddressConverted []byte, username string) error {\n\n\tprovidedSetupKey, err := getSetupKey()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"get setup key: %v\", err)\n\t}\n\n\tloginRequest, err := setupLoginRequest(providedSetupKey, customDNSAddressConverted, cmd)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"setup login request: %v\", err)\n\t}\n\n\tprofileID := activeProf.ID.String()\n\tloginRequest.ProfileName = &profileID\n\tloginRequest.Username = &username\n\n\tprofileState, err := pm.GetProfileState(activeProf.ID)\n\tif err != nil {\n\t\tlog.Debugf(\"failed to get profile state for login hint: %v\", err)\n\t} else if profileState.Email != \"\" {\n\t\tloginRequest.Hint = &profileState.Email\n\t}\n\n\tvar loginErr error\n\tvar loginResp *proto.LoginResponse\n\n\terr = WithBackOff(func() error {\n\t\tvar backOffErr error","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/cmd/up.go#L330-L366","documentation":"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.","triggerScenarios":"`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.","commonSituations":"Copy-pasted flag values from older docs with different accepted formats; scripts templating flag values that end up empty or malformed.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// run the same validators the CLI uses, before spawning it\nif err := validateNATExternalIPs(externalIPs); err != nil { return err }\nif _, err := domain.ValidateDomains(dnsLabels); err != nil { return err }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Dry-run flag values through netip.ParseIP / netip.ParseAddrPort / domain.ValidateDomains in scripts","Keep flag templates per-OS (interface names, utun on macOS)"],"tags":["go","netbird","cli","validation","flags","login-request"],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}