netbirdio/netbird · error

start extend session

Error message

start extend session: %v

What it means

The first step of session extension failed: dialing the daemon or sending RequestExtendAuthSession. The CLI pre-fills the IdP login hint and reports graphical-session availability; failure here means the daemon was unreachable or refused to start the extension flow.

Solutions

  1. Ensure the daemon is running ('netbird service status') and retry
  2. Read the inner error for refused/unsupported RPC indicating an outdated daemon
  3. Re-login with 'netbird login' if extension keeps failing
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at client/cmd/login.go:205 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16). Data as JSON: /api/errors/283b6dedcf673f35. Report an issue: GitHub.

Appendix: source

Thrown at client/cmd/login.go:205

	defer conn.Close()

	client := proto.NewDaemonServiceClient(conn)

	// the CLI runs in the user's session, the daemon does not: tell it what we can see
	req := &proto.RequestExtendAuthSessionRequest{HasGraphicalSession: util.HasGraphicalSession()}
	// Pre-fill the IdP login hint from the active profile so the user
	// doesn't have to retype their email. Best-effort: we still proceed
	// without a hint if the lookup fails.
	pm := profilemanager.NewProfileManager()
	if active, perr := pm.GetActiveProfile(); perr == nil {
		if profState, sperr := pm.GetProfileState(active.ID); sperr == nil && profState.Email != "" {
			req.Hint = &profState.Email
		}
	}

	startResp, err := client.RequestExtendAuthSession(ctx, req)
	if err != nil {
		return fmt.Errorf("start extend session: %v", err)
	}

	uri := startResp.GetVerificationURIComplete()
	if uri == "" {
		uri = startResp.GetVerificationURI()
	}
	openURL(cmd, uri, startResp.GetUserCode(), noBrowser, showQR)

	waitResp, err := client.WaitExtendAuthSession(ctx, &proto.WaitExtendAuthSessionRequest{
		DeviceCode: startResp.GetDeviceCode(),
		UserCode:   startResp.GetUserCode(),
	})
	if err != nil {
		return fmt.Errorf("wait for extend session: %v", err)
	}

	if ts := waitResp.GetSessionExpiresAt(); ts.IsValid() && !ts.AsTime().IsZero() {
		deadline := ts.AsTime().Local()

View on GitHub (pinned to 93e97f4bf1)