netbirdio/netbird · error

failed to check SSO support: %v

Error message

failed to check SSO support: %v

What it means

After the auth client is created, Android's saveConfigIfSSOSupported calls authClient.IsSSOSupported(ctx), an RPC to management that determines whether the account needs interactive SSO or can use setup-key-style flows. Any RPC failure (transport drop, server error, canceled context) is wrapped as this error with %v.

Source

Thrown at client/android/login.go:100

		sso, err := a.saveConfigIfSSOSupported()
		if err != nil {
			listener.OnError(err)
		} else {
			listener.OnSuccess(sso)
		}
	}()
}

func (a *Auth) saveConfigIfSSOSupported() (bool, error) {
	authClient, err := auth.NewAuth(a.ctx, a.config.PrivateKey, a.config.ManagementURL, a.config)
	if err != nil {
		return false, fmt.Errorf("failed to create auth client: %v", err)
	}
	defer authClient.Close()

	supportsSSO, err := authClient.IsSSOSupported(a.ctx)
	if err != nil {
		return false, fmt.Errorf("failed to check SSO support: %v", err)
	}

	if !supportsSSO {
		return false, nil
	}

	err = profilemanager.WriteOutConfig(a.cfgPath, a.config)
	return true, err
}

// LoginWithSetupKeyAndSaveConfig test the connectivity with the management server with the setup key.
func (a *Auth) LoginWithSetupKeyAndSaveConfig(resultListener ErrListener, setupKey string, deviceName string) {
	go func() {
		err := a.loginWithSetupKeyAndSaveConfig(setupKey, deviceName)
		if err != nil {
			resultListener.OnError(err)
		} else {
			resultListener.OnSuccess()

View on GitHub (pinned to 93e97f4bf1)

Solutions

  1. Retry the login attempt; this check is a plain RPC and transient failures are common.
  2. Confirm management is healthy (check its logs or /api/v1/ health) if it fails repeatedly.
  3. Ensure the app keeps the process in the foreground during the login flow so the context is not canceled.
Defensive patterns

Strategy: retry

Type guard

func isSSOCheckFailure(err error) bool {
    return err != nil && strings.HasPrefix(err.Error(), "failed to check SSO support:")
}

Try / catch

sso, err := a.saveConfigIfSSOSupported()
if err != nil && isSSOCheckFailure(err) {
    // transient RPC failure is common on mobile: retry with backoff a few
    // times before reporting to the listener
}

Prevention

When it happens

Trigger: Management reachable at dial time but failing the RPC mid-flight; management restarting or returning an internal error; the app process backgrounding and canceling the context on Android.

Common situations: Flaky mobile connectivity during login; management server upgrade in progress; timeouts on high-latency links.

Related errors


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