{"record":{"id":"d5633f9b14c0fab0","repo":"AlexxIT/go2rtc","slug":"webrtc-d5633f","errorCode":null,"errorMessage":"webrtc: ","messagePattern":"webrtc: ","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/webrtc/openipc.go","lineNumber":82,"sourceCode":"\n\t\t\treq := openIPCReq{\n\t\t\t\tData: msg.ToJSON().Candidate,\n\t\t\t\tReq:  \"candidate\",\n\t\t\t}\n\t\t\tif err = conn.WriteJSON(&req); err != nil {\n\t\t\t\tconnState.Done(err)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tlog.Trace().Msgf(\"[webrtc] openipc send: %s\", req)\n\n\t\tcase pion.PeerConnectionState:\n\t\t\tswitch msg {\n\t\t\tcase pion.PeerConnectionStateConnecting:\n\t\t\tcase pion.PeerConnectionStateConnected:\n\t\t\t\tconnState.Done(nil)\n\t\t\tdefault:\n\t\t\t\tconnState.Done(errors.New(\"webrtc: \" + msg.String()))\n\t\t\t}\n\t\t}\n\t})\n\n\tgo func() {\n\t\tvar err error\n\n\t\t// will be closed when conn will be closed\n\t\tfor err == nil {\n\t\t\tvar rep openIPCReply\n\t\t\tif err = conn.ReadJSON(&rep); err != nil {\n\t\t\t\t// some buggy messages from Amazon servers\n\t\t\t\tif errors.Is(err, io.ErrUnexpectedEOF) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/internal/webrtc/openipc.go#L64-L100","documentation":"OpenIPC WebRTC watcher reports a terminal PeerConnectionState: any state other than Connecting/Connected (i.e. failed, disconnected, closed) is converted into this error with the state name appended. It signals the DTLS/ICE session died before or after establishment; connState.Done(err) unblocks whoever waits for connection completion.","triggerScenarios":"Thrown at internal/webrtc/openipc.go:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check NAT/STUN reachability between client and camera for ICE failures","Verify the camera's WebRTC support and firmware state; reboot the camera if it dropped the session","Reconnect: re-run the openipc handshake to establish a fresh peer connection"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}