AlexxIT/go2rtc · error

miss: unsupported vendor

Error message

miss: unsupported vendor %s

What it means

NewClient read the 'vendor' query parameter from the xiaomi:// URL and it is neither 'cs2' nor 'tutk', the only supported transports. The connection is never dialed; the offending vendor string is included.

Solutions

  1. Set vendor=cs2 or vendor=tutk in the connection URL query
  2. Fix typos/case in the vendor value
  3. Check the miss package docs for the exact accepted vendor strings
  4. Use the correct transport for your hardware (cs2 for CS2-based, tutk for TUTK-based cameras)

Example fix

// before
u := "miss://host?vendor=csj&uid=..."
// after
u := "miss://host?vendor=cs2&uid=..."
Defensive patterns

Strategy: validation

Validate before calling

vendor := u.Query().Get("vendor")
if vendor != "cs2" && vendor != "tutk" {
    return fmt.Errorf("vendor must be cs2 or tutk, got %q", vendor)
}

Prevention

When it happens

Trigger: Calling Dial with a miss:// URL whose vendor query parameter is missing or not one of 'cs2' or 'tutk'.

Common situations: Missing vendor= query parameter in the connection URL; typo such as vendor=CS2 (case mismatch) or vendor=tutk2; copying a URL pattern from a different camera family.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07). Data as JSON: /api/errors/0d3beb620243ce19. Report an issue: GitHub.

Appendix: source

Thrown at pkg/xiaomi/miss/client.go:62

	// 1. Check if we can create shared key.
	query := u.Query()
	key, err := crypto.CalcSharedKey(query.Get("device_public"), query.Get("client_private"))
	if err != nil {
		return nil, err
	}

	model := query.Get("model")

	// 2. Check if this vendor supported.
	var conn Conn
	switch s := query.Get("vendor"); s {
	case "cs2":
		conn, err = cs2.Dial(u.Host, query.Get("transport"))
	case "tutk":
		conn, err = tutk.Dial(u.Host, query.Get("uid"), "Miss", "client")
	default:
		err = fmt.Errorf("miss: unsupported vendor %s", s)
	}

	if err != nil {
		return nil, err
	}

	err = login(conn, query.Get("client_public"), query.Get("sign"))
	if err != nil {
		_ = conn.Close()
		return nil, err
	}

	return &Client{Conn: conn, key: key, model: model}, nil
}

type Client struct {
	Conn
	key   []byte

View on GitHub (pinned to c245815e75)