{"record":{"id":"48d6987eca5f01f6","repo":"AlexxIT/go2rtc","slug":"unsupported-url","errorCode":null,"errorMessage":"unsupported url: ","messagePattern":"unsupported url: ","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/webrtc/client.go","lineNumber":66,"sourceCode":"\t\t\t\treturn switchbotClient(rawURL, query)\n\t\t\t} else {\n\t\t\t\treturn go2rtcClient(rawURL)\n\t\t\t}\n\n\t\tcase \"http\", \"https\":\n\t\t\tif format == \"milestone\" {\n\t\t\t\treturn milestoneClient(rawURL, query)\n\t\t\t} else if format == \"wyze\" {\n\t\t\t\t// https://github.com/mrlt8/docker-wyze-bridge\n\t\t\t\treturn wyzeClient(rawURL)\n\t\t\t} else if format == \"creality\" {\n\t\t\t\treturn crealityClient(rawURL)\n\t\t\t} else {\n\t\t\t\treturn whepClient(rawURL)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil, errors.New(\"unsupported url: \" + rawURL)\n}\n\n// go2rtcClient can connect only to go2rtc server\n// ex: ws://localhost:1984/api/ws?src=camera1\nfunc go2rtcClient(url string) (core.Producer, error) {\n\t// 1. Connect to signalign server\n\tconn, _, err := Dial(url)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// close websocket when we ready return Producer or connection error\n\tdefer conn.Close()\n\n\t// 2. Create PeerConnection\n\tpc, err := PeerConnection(true)\n\tif err != nil {\n\t\treturn nil, err","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/internal/webrtc/client.go#L48-L84","documentation":"The WebRTC client factory (streamsHandler) tried every known WHEP/ signaling pattern against the URL — go2rtc WS, creality, plain WHEP heuristics — and none matched the URL's shape/scheme, so it gives up with this error.","triggerScenarios":"Passing a WebRTC source URL to a stream that is neither a go2rtc ws:// signaling URL, a recognized creality URL, nor a WHEP-style URL; e.g. empty string, http:// page, or an unsupported signaling scheme like plain WHIP or custom vendor URLs.","commonSituations":"Typo in the camera signaling URL; pointing at a WHIP (publish) endpoint instead of WHEP (play); vendor cameras with proprietary signaling not integrated in go2rtc.","solutions":["Use a supported URL form: go2rtc ws://host:1984/api/ws?src=name or a standard WHEP endpoint (e.g. https://host/whep)","Check the URL scheme/path matches what your camera vendor actually exposes; many WebRTC cameras are not WHEP-compatible","Add a custom producer for the vendor's signaling protocol if it's proprietary","Enable debug logs to see which client branch was attempted before failing"],"exampleFix":"// before\nsrc: \"http://camera.local/webrtc\"\n// after\nsrc: \"https://camera.local/whep\"","handlingStrategy":"validation","validationCode":"func isWebRTCSource(u string) bool {\n\tparsed, err := url.Parse(u)\n\tif err != nil {\n\t\treturn false\n\t}\n\tswitch parsed.Scheme {\n\tcase \"ws\", \"wss\", \"http\", \"https\":\n\t\treturn true\n\t}\n\treturn false\n}","typeGuard":null,"tryCatchPattern":"prod, err := streamsHandler(rawURL)\nif err != nil && strings.HasPrefix(err.Error(), \"unsupported url:\") {\n\t// fall back to another consumer (HLS/MSE) or report config error\n}","preventionTips":["Use go2rtc WS or standard WHEP endpoints for webrtc sources","Test camera signaling URLs with a WHEP client before adding to config","Document vendor-specific requirements in stream config comments"],"tags":["go","webrtc","url"],"backgroundTag":"invalid-url","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"}