{"record":{"id":"0f2c2eee04e3db71","repo":"netbirdio/netbird","slug":"login-failed-v-0f2c2e","errorCode":null,"errorMessage":"login failed: %v","messagePattern":"login failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/cmd/login.go","lineNumber":162,"sourceCode":"\n\terr = WithBackOff(func() error {\n\t\tvar backOffErr error\n\t\tloginResp, backOffErr = client.Login(ctx, &loginRequest)\n\t\tif s, ok := gstatus.FromError(backOffErr); ok && (s.Code() == codes.InvalidArgument ||\n\t\t\ts.Code() == codes.PermissionDenied ||\n\t\t\ts.Code() == codes.NotFound ||\n\t\t\ts.Code() == codes.Unimplemented) {\n\t\t\tloginErr = backOffErr\n\t\t\treturn nil\n\t\t}\n\t\treturn backOffErr\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"login backoff cycle failed: %v\", err)\n\t}\n\n\tif loginErr != nil {\n\t\treturn fmt.Errorf(\"login failed: %v\", loginErr)\n\t}\n\n\tif loginResp.NeedsSSOLogin {\n\t\tif err := handleSSOLogin(ctx, cmd, loginResp, client, pm); err != nil {\n\t\t\treturn fmt.Errorf(\"sso login failed: %v\", err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// doExtendSession drives the daemon's RequestExtendAuthSession /\n// WaitExtendAuthSession pair. The user is sent through a regular SSO flow\n// (browser + verification URL) and the resulting JWT is forwarded to the\n// management server's ExtendAuthSession RPC. The tunnel stays up\n// throughout — no Down/Up, no network-map resync.\nfunc doExtendSession(ctx context.Context, cmd *cobra.Command) error {\n\tconn, err := DialClientGRPCServer(ctx, daemonAddr)","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/cmd/login.go#L144-L180","documentation":"Error \"login failed: %v\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/cmd/login.go:162 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}