client-sdk-flutter
client-sdk-flutter copied to clipboard
[bug] LiveKit Exception: [MediaConnectException] Timed out waiting for PeerConnection to connect, please check your network for ICE connectivity
Describe the bug I am running the application on two separate Android devices and executing the connect method:
await room!.connect(NetConfig.liveKitUrl, token);
The first device successfully connects, but the second one throws an error: "Timed out waiting for PeerConnection to connect, please check your network for ICE connectivity."
LiveKit logs show:
2024-05-26T16:10:08.974+0800 DEBUG livekit routing/signal.go:100 starting signal connection {"room": "100", "reqNodeID": "ND_T3SGNoLmx3sZ", "participant": "", "connID": "CO_kcQP64MQ8J5W"}
2024-05-26T16:10:08.975+0800 DEBUG livekit routing/signal.go:136 signal stream closed {"room": "100", "reqNodeID": "ND_T3SGNoLmx3sZ", "participant": "", "connID": "CO_kcQP64MQ8J5W", "error": "stream closed"}
2024-05-26T16:10:08.975+0800 INFO livekit.api service/twirp.go:124 API RoomService.CreateRoom {"service": "RoomService", "method": "CreateRoom", "room": "100", "request": "name:\"100\" empty_timeout:600 max_participants:20", "duration": "698.415µs", "status": "200"}
2024-05-26T16:10:08.975+0800 DEBUG livekit service/signal.go:175 signal stream closed {"room": "100", "participant": "", "connID": "CO_kcQP64MQ8J5W", "error": "stream closed"}
2024-05-26T16:10:09.014+0800 DEBUG livekit routing/signal.go:100 starting signal connection {"room": "100", "reqNodeID": "ND_T3SGNoLmx3sZ", "participant": "10", "connID": "CO_8xMciEBSUpTT"}
2024-05-26T16:10:09.015+0800 DEBUG livekit service/roommanager.go:356 starting RTC session {"room": "100", "nodeID": "ND_T3SGNoLmx3sZ", "participant": "10", "clientInfo": {"sdk": 4, "version": "2.1.4", "protocol": 12, "os": "android", "osVersion": "12", "deviceModel": "22041216C", "browser": "Other", "address": "192.168.150.190", "network": "cellular"}, "reconnect": false, "reconnectReason": "RR_UNKNOWN", "adaptiveStream": false, "numParticipants": 0}
2024-05-26T16:10:09.017+0800 DEBUG livekit.room rtc/room.go:412 new participant joined {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "pID": "PA_mimoGNtYrazR", "participant": "10", "clientInfo": {"sdk": 4, "version": "2.1.4", "protocol": 12, "os": "android", "osVersion": "12", "deviceModel": "22041216C", "browser": "Other", "address": "192.168.150.190", "network": "cellular"}, "options": {"AutoSubscribe":false}, "numParticipants": 0}
2024-05-26T16:10:09.017+0800 DEBUG livekit rtc/participant.go:1399 updating participant state {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "state": "JOINED"}
2024-05-26T16:10:09.017+0800 DEBUG livekit rtc/participant.go:978 SetMigrateState {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "state": "MIGRATE_STATE_COMPLETE"}
2024-05-26T16:10:09.018+0800 DEBUG livekit service/rtcservice.go:300 new client WS connected {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "connID": "CO_8xMciEBSUpTT", "reconnect": false, "reconnectReason": "RR_UNKNOWN", "adaptiveStream": false, "selectedNodeID": "ND_T3SGNoLmx3sZ", "nodeSelectionReason": ""}
2024-05-26T16:10:09.018+0800 DEBUG livekit.transport rtc/transport.go:594 ice gathering state change {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "state": "gathering"}
2024-05-26T16:10:09.018+0800 DEBUG livekit.sub rtc/participant.go:1432 sending offer {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER"}
2024-05-26T16:10:09.019+0800 DEBUG livekit service/rtcservice.go:340 sending offer {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "offer": {"Offer":{"type":"offer","sdp":"v=0\r\no=- 6158550192349871161 1716711009 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=msid-semantic:WMS*\r\na=fingerprint:sha-256 30:E1:EE:62:D4:FB:75:A3:D0:56:8B:32:4B:F6:1B:5C:0D:0E:CE:87:2A:E3:2F:53:E3:0D:FF:43:36:2F:02:2D\r\na=extmap-allow-mixed\r\na=group:BUNDLE 0\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=mid:0\r\na=sendrecv\r\na=sctp-port:5000\r\na=ice-ufrag:yVFKvkHocdBkLNCs\r\na=ice-pwd:HjJqHDqzwhWBLhsAtHSDGxZkbPoCAawA\r\n"}}}
2024-05-26T16:10:09.019+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:3102448734 1 udp 2130706431 192.168.150.148 7882 typ host\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.019+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:3571317594 1 udp 2130706431 2408:8439:120:6e54:ccae:1454:6811:24a2 7882 typ host\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.019+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:3114607224 1 udp 2130706431 192.168.49.1 7882 typ host\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.019+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:233762139 1 udp 2130706431 172.17.0.1 7882 typ host\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.019+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:85519806 1 tcp 1671430143 192.168.150.148 7881 typ host tcptype passive\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.019+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:1764657850 1 tcp 1671430143 2408:8439:120:6e54:ccae:1454:6811:24a2 7881 typ host tcptype passive\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.019+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:72766360 1 tcp 1671430143 192.168.49.1 7881 typ host tcptype passive\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.019+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:2954730683 1 tcp 1671430143 172.17.0.1 7881 typ host tcptype passive\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.114+0800 DEBUG livekit service/rtcservice.go:415 received answer {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "answer": {"Answer":{"type":"answer","sdp":"v=0\r\no=- 4248586738589604164 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=ice-ufrag:12bJ\r\na=ice-pwd:OwLA9AlpSEm+e6n3hgOyOpq0\r\na=ice-options:trickle renomination\r\na=fingerprint:sha-256 B3:47:89:72:80:11:85:68:FE:C2:F3:CC:4F:BA:01:54:77:9B:54:5B:32:53:DE:70:C7:C3:3E:94:2B:F0:93:4E\r\na=setup:active\r\na=mid:0\r\na=sctp-port:5000\r\n"}}}
2024-05-26T16:10:09.115+0800 DEBUG livekit.sub rtc/participant.go:712 received answer {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER"}
2024-05-26T16:10:09.115+0800 DEBUG livekit.transport rtc/transport.go:626 ice connection state change {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "state": "checking"}
2024-05-26T16:10:09.115+0800 DEBUG livekit.transport rtc/transport.go:645 peer connection state change {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "state": "connecting"}
2024-05-26T16:10:09.152+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:3242761813 1 udp 2122063615 10.88.51.116 33204 typ host generation 0 ufrag 12bJ network-id 2 network-cost 900","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:09.156+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:1265187575 1 udp 2121932543 127.0.0.1 49359 typ host generation 0 ufrag 12bJ network-id 5","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:09.157+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:3952588273 1 udp 2122197247 2408:8439:120:6e54:17d2:f545:f1a9:5d79 33502 typ host generation 0 ufrag 12bJ network-id 3 network-cost 900","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:09.160+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:330772670 1 udp 2122005759 ::1 37919 typ host generation 0 ufrag 12bJ network-id 6","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:09.171+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:1972008009 1 udp 1694498815 113.5.161.115 57689 typ srflx raddr 0.0.0.0 rport 48920\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.172+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:4140999881 1 udp 1694498815 2408:8439:120:6e54:ccae:1454:6811:24a2 48644 typ srflx raddr :: rport 48644\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.172+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:4140999881 1 udp 1694498815 2408:8439:120:6e54:ccae:1454:6811:24a2 55217 typ srflx raddr :: rport 55217\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.172+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:1972008009 1 udp 1694498815 113.5.161.115 2144 typ srflx raddr 0.0.0.0 rport 60110\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.233+0800 DEBUG livekit.transport rtc/transport.go:594 ice gathering state change {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "state": "complete"}
2024-05-26T16:10:09.233+0800 DEBUG livekit rtc/participant_signal.go:259 sending ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "trickle": {"candidateInit": "{\"candidate\":\"candidate:1972008009 1 udp 1694498815 113.5.161.115 60516 typ srflx raddr 0.0.0.0 rport 51391\",\"sdpMid\":\"\",\"sdpMLineIndex\":0,\"usernameFragment\":null}", "target": 1}}
2024-05-26T16:10:09.251+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:3117248306 1 udp 1685855999 113.5.161.115 57690 typ srflx raddr 10.88.51.116 rport 33204 generation 0 ufrag 12bJ network-id 2 network-cost 900","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:09.272+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:3049516643 1 tcp 1517952767 127.0.0.1 51965 typ host tcptype passive generation 0 ufrag 12bJ network-id 5","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:09.272+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:1004494927 1 tcp 1518283007 2408:8539:100:3e2b:17d2:f422:a55d:653f 9 typ host tcptype active generation 0 ufrag 12bJ network-id 1 network-cost 900","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:09.272+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:981725307 1 tcp 1518151935 2409:811b:1a8:b4b4::1 9 typ host tcptype active generation 0 ufrag 12bJ network-id 4 network-cost 900","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:09.274+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:3978159146 1 tcp 1518025983 ::1 46887 typ host tcptype passive generation 0 ufrag 12bJ network-id 6","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:09.277+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:3876826370 1 udp 1685989631 2408:8439:120:6e54:17d2:f545:f1a9:5d79 33502 typ srflx raddr 2408:8439:120:6e54:17d2:f545:f1a9:5d79 rport 33502 generation 0 ufrag 12bJ network-id 3 network-cost 900","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:09.297+0800 DEBUG livekit.transport rtc/transport.go:1412 added cached ICE candidate {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "candidate": {"candidate":"candidate:3117248306 1 udp 1685855999 113.5.161.115 5557 typ srflx raddr 10.88.51.116 rport 33204 generation 0 ufrag 12bJ network-id 2 network-cost 900","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":null}}
2024-05-26T16:10:24.145+0800 DEBUG livekit.transport rtc/transport.go:626 ice connection state change {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "state": "failed"}
2024-05-26T16:10:24.145+0800 DEBUG livekit.transport rtc/transport.go:645 peer connection state change {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "state": "failed"}
2024-05-26T16:10:24.145+0800 INFO livekit rtc/participant_signal.go:318 closing signal connection {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "reason": "TRANSPORT_FAILURE", "connID": "CO_8xMciEBSUpTT"}
2024-05-26T16:10:24.145+0800 DEBUG livekit service/signal.go:175 signal stream closed {"room": "100", "participant": "10", "connID": "CO_8xMciEBSUpTT", "error": "stream closed"}
2024-05-26T16:10:24.145+0800 DEBUG livekit.transport rtc/transportmanager.go:718 signal source valid {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "valid": false}
2024-05-26T16:10:24.145+0800 DEBUG livekit routing/signal.go:136 signal stream closed {"room": "100", "reqNodeID": "ND_T3SGNoLmx3sZ", "participant": "10", "connID": "CO_8xMciEBSUpTT", "error": null}
2024-05-26T16:10:24.145+0800 INFO livekit rtc/participant.go:829 participant closing {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "sendLeave": false, "reason": "SIGNAL_SOURCE_CLOSE", "isExpectedToResume": false}
2024-05-26T16:10:24.145+0800 DEBUG livekit service/rtcservice.go:327 nothing to read from response source {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "connID": "CO_8xMciEBSUpTT"}
2024-05-26T16:10:24.145+0800 DEBUG livekit rtc/participant.go:1399 updating participant state {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "state": "DISCONNECTED"}
2024-05-26T16:10:24.145+0800 DEBUG livekit service/rtcservice.go:263 finishing WS connection {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "connID": "CO_8xMciEBSUpTT", "closedByClient": true}
2024-05-26T16:10:24.146+0800 DEBUG livekit service/roommanager.go:604 RTC session finishing {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "connID": "CO_8xMciEBSUpTT"}
2024-05-26T16:10:24.146+0800 INFO livekit rtc/room.go:590 removing participant without connection {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "subscriberCandidates": ["[local] udp4 host 192.168.150.148:7882", "[local] udp6 host [2408:8439:120:6e54:ccae:1454:6811:24a2]:7882", "[local] udp4 host 192.168.49.1:7882", "[local] udp4 host 172.17.0.1:7882", "[local] tcp4 host 192.168.150.148:7881", "[local] tcp6 host [2408:8439:120:6e54:ccae:1454:6811:24a2]:7881", "[local] tcp4 host 192.168.49.1:7881", "[local] tcp4 host 172.17.0.1:7881", "[local] udp4 srflx 113.5.161.115:57689 related 0.0.0.0:48920", "[local] udp6 srflx [2408:8439:120:6e54:ccae:1454:6811:24a2]:48644 related :::48644", "[local] udp6 srflx [2408:8439:120:6e54:ccae:1454:6811:24a2]:55217 related :::55217", "[local] udp4 srflx 113.5.161.115:2144 related 0.0.0.0:60110", "[local] udp4 srflx 113.5.161.115:60516 related 0.0.0.0:51391", "[remote] udp4 host 10.88.51.116:33204", "[remote] udp4 host 127.0.0.1:49359", "[remote] udp6 host [2408:8439:120:6e54:17d2:f545:f1a9:5d79]:33502", "[remote] udp6 host [::1]:37919", "[remote] udp4 srflx 113.5.161.115:57690 related 10.88.51.116:33204", "[remote] tcp4 host 127.0.0.1:51965", "[remote] tcp6 host [2408:8539:100:3e2b:17d2:f422:a55d:653f]:9", "[remote] tcp6 host [2409:811b:1a8:b4b4::1]:9", "[remote] tcp6 host [::1]:46887", "[remote] udp6 srflx [2408:8439:120:6e54:17d2:f545:f1a9:5d79]:33502 related 2408:8439:120:6e54:17d2:f545:f1a9:5d79:33502", "[remote] udp4 srflx 113.5.161.115:5557 related 10.88.51.116:33204"], "connectionType": "unknown", "reason": "NONE"}
2024-05-26T16:10:24.146+0800 DEBUG livekit.transport rtc/transport.go:645 peer connection state change {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "PUBLISHER", "state": "closed"}
2024-05-26T16:10:24.146+0800 DEBUG livekit.transport rtc/transport.go:594 ice gathering state change {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "state": "closed"}
2024-05-26T16:10:24.146+0800 DEBUG livekit.transport rtc/transport.go:626 ice connection state change {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "state": "closed"}
2024-05-26T16:10:24.146+0800 DEBUG livekit.transport rtc/transport.go:645 peer connection state change {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "transport": "SUBSCRIBER", "state": "closed"}
2024-05-26T16:10:24.174+0800 DEBUG livekit routing/signal.go:100 starting signal connection {"room": "100", "reqNodeID": "ND_T3SGNoLmx3sZ", "participant": "10", "connID": "CO_pnQtg8XUem7U"}
2024-05-26T16:10:24.174+0800 ERROR livekit service/signal.go:188 could not handle new participant {"room": "100", "participant": "10", "connID": "CO_pnQtg8XUem7U", "error": "could not restart participant", "errorVerbose": "could not restart participant\ngithub.com/livekit/livekit-server/pkg/service.(*RoomManager).StartSession\n\t/home/runner/go/pkg/mod/github.com/livekit/[email protected]/pkg/service/roommanager.go:353\ngithub.com/livekit/livekit-server/pkg/service.(*defaultSessionHandler).HandleSession\n\t/home/runner/go/pkg/mod/github.com/livekit/[email protected]/pkg/service/signal.go:118\ngithub.com/livekit/livekit-server/pkg/service.(*signalService).RelaySignal\n\t/home/runner/go/pkg/mod/github.com/livekit/[email protected]/pkg/service/signal.go:185\ngithub.com/livekit/psrpc/pkg/server.(*streamHandler[...]).handleOpenRequest\n\t/home/runner/go/pkg/mod/github.com/livekit/[email protected]/pkg/server/stream.go:202\ngithub.com/livekit/psrpc/pkg/server.(*streamHandler[...]).handleRequest.func1\n\t/home/runner/go/pkg/mod/github.com/livekit/[email protected]/pkg/server/stream.go:141\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.22.2/x64/src/runtime/asm_amd64.s:1695"}
github.com/livekit/livekit-server/pkg/service.(*signalService).RelaySignal
/home/runner/go/pkg/mod/github.com/livekit/[email protected]/pkg/service/signal.go:188
github.com/livekit/psrpc/pkg/server.(*streamHandler[...]).handleOpenRequest
/home/runner/go/pkg/mod/github.com/livekit/[email protected]/pkg/server/stream.go:202
github.com/livekit/psrpc/pkg/server.(*streamHandler[...]).handleRequest.func1
/home/runner/go/pkg/mod/github.com/livekit/[email protected]/pkg/server/stream.go:141
2024-05-26T16:10:24.175+0800 DEBUG livekit service/signal.go:175 signal stream closed {"room": "100", "participant": "10", "connID": "CO_pnQtg8XUem7U", "error": "stream closed"}
2024-05-26T16:10:24.175+0800 DEBUG livekit routing/signal.go:136 signal stream closed {"room": "100", "reqNodeID": "ND_T3SGNoLmx3sZ", "participant": "10", "connID": "CO_pnQtg8XUem7U", "error": null}
2024-05-26T16:10:24.175+0800 DEBUG livekit service/rtcservice.go:300 new client WS connected {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "connID": "CO_pnQtg8XUem7U", "reconnect": true, "reconnectReason": "RR_UNKNOWN", "adaptiveStream": false, "selectedNodeID": "ND_T3SGNoLmx3sZ", "nodeSelectionReason": ""}
2024-05-26T16:10:24.175+0800 DEBUG livekit service/rtcservice.go:327 nothing to read from response source {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "connID": "CO_pnQtg8XUem7U"}
2024-05-26T16:10:24.175+0800 DEBUG livekit service/rtcservice.go:263 finishing WS connection {"room": "100", "roomID": "RM_9x8o7Wf5v3yP", "participant": "10", "pID": "PA_mimoGNtYrazR", "remote": false, "connID": "CO_pnQtg8XUem7U", "closedByClient": true}
Platform information
- flutter doctor: [✓] Flutter (Channel stable, 3.19.6, on macOS 14.0 23A344 darwin-x64, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] IntelliJ IDEA Ultimate Edition (version 2024.1) [✓] VS Code (version 1.88.1) [✓] Connected device (4 available) [✓] Network resources
- livekit version: 2.1.4
This probably happens after the first call. You need to call room.disconnect() after a call closes or is cancelled. Note: On some platforms (JavaScript and Swift), Room.disconnect is called automatically when the application exits.
Calling room.disconnect() should solve your problem.
This probably happens after the first call. You need to call room.disconnect() after a call closes or is cancelled. Note: On some platforms (JavaScript and Swift), Room.disconnect is called automatically when the application exits.
I have called disconnect every time, but this problem still occurs. It seems to be a bug in 2.x.
Please refer to this PR to fix the issue that disconnect does not wait for the room to be closed correctly.
https://github.com/livekit/client-sdk-flutter/pull/559
Please refer to this PR to fix the issue that disconnect does not wait for the room to be closed correctly.
#559
Bug seems fixed, but the called party does not receive ParticipantDisconnectedEvent event, when the caller leaves the room, after applying this patch.
Please refer to this PR to fix the issue that disconnect does not wait for the room to be closed correctly. #559
Bug seems fixed, but the called party does not receive ParticipantDisconnectedEvent event, when the caller leaves the room, after applying this patch.
Just tested it seems to work, User A calls await room.disconnect(); , User B can emit ParticipantDisconnectedEvent
Please correct me if I didn't understand what you are describing correctly.
Fixed in new version https://github.com/livekit/client-sdk-flutter/commit/9fad8c6e92303c856f7ed62fd1ef3340742fa171