netbirdio/netbird · error

parse handshake sec: %w

Error message

parse handshake sec: %w

What it means

Error "parse handshake sec: %w" thrown in netbirdio/netbird.

Source

Thrown at client/iface/configurer/usp.go:487

		if p.PersistentKeepaliveInterval != nil {
			sb.WriteString(fmt.Sprintf("persistent_keepalive_interval=%d\n", int(p.PersistentKeepaliveInterval.Seconds())))
		}

		if p.ReplaceAllowedIPs {
			sb.WriteString("replace_allowed_ips=true\n")
		}

		for _, aip := range p.AllowedIPs {
			sb.WriteString(fmt.Sprintf("allowed_ip=%s\n", aip.String()))
		}
	}
	return sb.String()
}

func toLastHandshake(stringVar string) (time.Time, error) {
	sec, err := strconv.ParseInt(stringVar, 10, 64)
	if err != nil {
		return time.Time{}, fmt.Errorf("parse handshake sec: %w", err)
	}

	// If sec is 0 (Unix epoch), return zero time instead
	// This indicates no handshake has occurred
	if sec == 0 {
		return time.Time{}, nil
	}

	return time.Unix(sec, 0), nil
}

func toBytes(s string) (int64, error) {
	return strconv.ParseInt(s, 10, 64)
}

func getFwmark() int {
	if nbnet.AdvancedRouting() && runtime.GOOS == "linux" {
		return nbnet.ControlPlaneMark

View on GitHub (pinned to 93e97f4bf1)

When it happens

Trigger: Thrown at client/iface/configurer/usp.go:487 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


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