{"record":{"id":"283b6dedcf673f35","repo":"netbirdio/netbird","slug":"start-extend-session-v","errorCode":null,"errorMessage":"start extend session: %v","messagePattern":"start extend session: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/cmd/login.go","lineNumber":205,"sourceCode":"\tdefer conn.Close()\n\n\tclient := proto.NewDaemonServiceClient(conn)\n\n\t// the CLI runs in the user's session, the daemon does not: tell it what we can see\n\treq := &proto.RequestExtendAuthSessionRequest{HasGraphicalSession: util.HasGraphicalSession()}\n\t// Pre-fill the IdP login hint from the active profile so the user\n\t// doesn't have to retype their email. Best-effort: we still proceed\n\t// without a hint if the lookup fails.\n\tpm := profilemanager.NewProfileManager()\n\tif active, perr := pm.GetActiveProfile(); perr == nil {\n\t\tif profState, sperr := pm.GetProfileState(active.ID); sperr == nil && profState.Email != \"\" {\n\t\t\treq.Hint = &profState.Email\n\t\t}\n\t}\n\n\tstartResp, err := client.RequestExtendAuthSession(ctx, req)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"start extend session: %v\", err)\n\t}\n\n\turi := startResp.GetVerificationURIComplete()\n\tif uri == \"\" {\n\t\turi = startResp.GetVerificationURI()\n\t}\n\topenURL(cmd, uri, startResp.GetUserCode(), noBrowser, showQR)\n\n\twaitResp, err := client.WaitExtendAuthSession(ctx, &proto.WaitExtendAuthSessionRequest{\n\t\tDeviceCode: startResp.GetDeviceCode(),\n\t\tUserCode:   startResp.GetUserCode(),\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"wait for extend session: %v\", err)\n\t}\n\n\tif ts := waitResp.GetSessionExpiresAt(); ts.IsValid() && !ts.AsTime().IsZero() {\n\t\tdeadline := ts.AsTime().Local()","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/cmd/login.go#L187-L223","documentation":"Error \"start extend session: %v\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/cmd/login.go:205 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"}