netbirdio/netbird · error

get active profile: %v

Error message

get active profile: %v

What it means

Error "get active profile: %v" thrown in netbirdio/netbird.

Source

Thrown at client/cmd/login.go:65

			return fmt.Errorf("set env and flags: %v", err)
		}

		ctx := internal.CtxInitState(context.Background())

		if hostName != "" {
			// nolint
			ctx = context.WithValue(ctx, system.DeviceNameCtxKey, hostName)
		}
		username, err := user.Current()
		if err != nil {
			return fmt.Errorf("get current user: %v", err)
		}

		pm := profilemanager.NewProfileManager()

		activeProf, err := getActiveProfile(cmd.Context(), pm, profileName, username.Username)
		if err != nil {
			return fmt.Errorf("get active profile: %v", err)
		}

		providedSetupKey, err := getSetupKey()
		if err != nil {
			return err
		}

		if extendSessionFlag {
			if providedSetupKey != "" {
				return fmt.Errorf("--extend cannot be combined with a setup key; setup keys can only enrol new peers")
			}
			if err := doExtendSession(ctx, cmd); err != nil {
				return fmt.Errorf("extend session failed: %v", err)
			}
			return nil
		}

		// workaround to run without service

View on GitHub (pinned to 93e97f4bf1)

When it happens

Trigger: Thrown at client/cmd/login.go:65 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/a198873d33f01f9b. Report an issue: GitHub.