{"record":{"id":"0d3beb620243ce19","repo":"AlexxIT/go2rtc","slug":"miss-unsupported-vendor-s","errorCode":null,"errorMessage":"miss: unsupported vendor %s","messagePattern":"miss: unsupported vendor (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/xiaomi/miss/client.go","lineNumber":62,"sourceCode":"\n\t// 1. Check if we can create shared key.\n\tquery := u.Query()\n\tkey, err := crypto.CalcSharedKey(query.Get(\"device_public\"), query.Get(\"client_private\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmodel := query.Get(\"model\")\n\n\t// 2. Check if this vendor supported.\n\tvar conn Conn\n\tswitch s := query.Get(\"vendor\"); s {\n\tcase \"cs2\":\n\t\tconn, err = cs2.Dial(u.Host, query.Get(\"transport\"))\n\tcase \"tutk\":\n\t\tconn, err = tutk.Dial(u.Host, query.Get(\"uid\"), \"Miss\", \"client\")\n\tdefault:\n\t\terr = fmt.Errorf(\"miss: unsupported vendor %s\", s)\n\t}\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = login(conn, query.Get(\"client_public\"), query.Get(\"sign\"))\n\tif err != nil {\n\t\t_ = conn.Close()\n\t\treturn nil, err\n\t}\n\n\treturn &Client{Conn: conn, key: key, model: model}, nil\n}\n\ntype Client struct {\n\tConn\n\tkey   []byte","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/xiaomi/miss/client.go#L44-L80","documentation":"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.","triggerScenarios":"Calling Dial with a miss:// URL whose vendor query parameter is missing or not one of 'cs2' or 'tutk'.","commonSituations":"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.","solutions":["Set vendor=cs2 or vendor=tutk in the connection URL query","Fix typos/case in the vendor value","Check the miss package docs for the exact accepted vendor strings","Use the correct transport for your hardware (cs2 for CS2-based, tutk for TUTK-based cameras)"],"exampleFix":"// before\nu := \"miss://host?vendor=csj&uid=...\"\n// after\nu := \"miss://host?vendor=cs2&uid=...\"","handlingStrategy":"validation","validationCode":"vendor := u.Query().Get(\"vendor\")\nif vendor != \"cs2\" && vendor != \"tutk\" {\n    return fmt.Errorf(\"vendor must be cs2 or tutk, got %q\", vendor)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the miss:// URL query parameters before Dial","Use the exact lowercase vendor strings","Document required URL parameters for users"],"tags":["miss","xiaomi","configuration"],"backgroundTag":"invalid-enum-value","analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}