aiortc failed after working 8 minutes when I connect it to chrome in controlling mode using google apprtc server.
Howerver aiortc works well for a long time if I use chrome login in the room at the beginning and aiortc login in the same room secondly.
aiortc failed because it's websocket heart-beat check failed and exit the connection. It doesn't reconnect the apprtc server. Is there a reconnect setting ?
I attached part of the log here.
DEBUG:rtp:receiver(video) > RtcpPsfbPacket(fmt=15, ssrc=2596041375, media_ssrc=0, fci=b'REMB\x01\x00gh\\x90\x0c\x9f')
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 38
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 164
DEBUG:rtp:sender(video) > RtpPacket(seq=18088, ts=2365362046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18089, ts=2365362046, marker=1, payload=96, 406 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 436
DEBUG:rtp:receiver(video) < RtpPacket(seq=46785, ts=4163426291, marker=1, payload=96, 130 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 94
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 158
DEBUG:rtp:receiver(video) < RtcpSrPacket(ssrc=1552944287, sender_info=RtcpSenderInfo(ntp_timestamp=16134187896596091724, rtp_timestamp=4163428361, packet_count=31048, octet_count=25439093), reports=[])
DEBUG:rtp:receiver(video) < RtcpSdesPacket(chunks=[RtcpSourceInfo(ssrc=1552944287, items=[(1, b'fu4pTxKHM5aZ9ynp')])])
DEBUG:rtp:receiver(video) < RtcpPsfbPacket(fmt=15, ssrc=1552944287, media_ssrc=0, fci=b'REMB\x01\x06\xb8\xb9\x9a\xbcr\x9f')
DEBUG:rtp:sender(video) - receiver estimated maximum bitrate 356722 bps
DEBUG:rtp:receiver(video) < RtpPacket(seq=46786, ts=4163429171, marker=1, payload=96, 124 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 230
DEBUG:rtp:receiver(video) < RtpPacket(seq=46787, ts=4163432051, marker=1, payload=96, 196 bytes)
DEBUG:rtp:receiver(video) > RtcpPsfbPacket(fmt=15, ssrc=2596041375, media_ssrc=0, fci=b'REMB\x01\x00i\xb1\\x90\x0c\x9f')
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 38
DEBUG:rtp:sender(video) > RtpPacket(seq=18090, ts=2365365046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18091, ts=2365365046, marker=1, payload=96, 48 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 78
DEBUG:rtp:sender(video) > RtpPacket(seq=18092, ts=2365368046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18093, ts=2365368046, marker=1, payload=96, 300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 330
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 132
DEBUG:rtp:receiver(video) < RtpPacket(seq=46788, ts=4163435291, marker=1, payload=96, 98 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 166
DEBUG:rtp:receiver(video) < RtpPacket(seq=46789, ts=4163438171, marker=1, payload=96, 132 bytes)
DEBUG:rtp:sender(video) > RtcpSrPacket(ssrc=2596041375, sender_info=RtcpSenderInfo(ntp_timestamp=16134188147075088323, rtp_timestamp=2365368046, packet_count=13842, octet_count=14083911), reports=[])
DEBUG:rtp:sender(video) > RtcpSdesPacket(chunks=[RtcpSourceInfo(ssrc=2596041375, items=[(1, b'{0e1b3b93-8830-437d-b8a0-367f2c1f4d8f}')])])
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 94
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 201
DEBUG:rtp:receiver(video) < RtpPacket(seq=46790, ts=4163441051, marker=1, payload=96, 167 bytes)
DEBUG:rtp:sender(video) > RtpPacket(seq=18094, ts=2365371046, marker=1, payload=96, 1177 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1207
DEBUG:rtp:sender(video) > RtpPacket(seq=18095, ts=2365374046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18096, ts=2365374046, marker=1, payload=96, 346 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 376
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 160
DEBUG:rtp:receiver(video) < RtpPacket(seq=46791, ts=4163444291, marker=1, payload=96, 126 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 211
DEBUG:rtp:receiver(video) < RtpPacket(seq=46792, ts=4163447171, marker=1, payload=96, 177 bytes)
DEBUG:rtp:sender(video) > RtpPacket(seq=18097, ts=2365377046, marker=1, payload=96, 1156 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1186
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 94
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 154
DEBUG:rtp:receiver(video) < RtcpSrPacket(ssrc=1552944287, sender_info=RtcpSenderInfo(ntp_timestamp=16134187897622417109, rtp_timestamp=4163449871, packet_count=31055, octet_count=25440113), reports=[])
DEBUG:rtp:receiver(video) < RtcpSdesPacket(chunks=[RtcpSourceInfo(ssrc=1552944287, items=[(1, b'fu4pTxKHM5aZ9ynp')])])
DEBUG:rtp:receiver(video) < RtcpPsfbPacket(fmt=15, ssrc=1552944287, media_ssrc=0, fci=b'REMB\x01\x06\xb8\xb9\x9a\xbcr\x9f')
DEBUG:rtp:sender(video) - receiver estimated maximum bitrate 356722 bps
DEBUG:rtp:receiver(video) < RtpPacket(seq=46793, ts=4163450051, marker=1, payload=96, 120 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 123
DEBUG:rtp:receiver(video) < RtpPacket(seq=46794, ts=4163453291, marker=1, payload=96, 89 bytes)
DEBUG:rtp:sender(video) > RtpPacket(seq=18098, ts=2365380046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18099, ts=2365380046, marker=1, payload=96, 460 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 490
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 168
DEBUG:rtp:receiver(video) < RtpPacket(seq=46795, ts=4163456171, marker=1, payload=96, 134 bytes)
DEBUG:rtp:receiver(video) > RtcpPsfbPacket(fmt=15, ssrc=2596041375, media_ssrc=0, fci=b'REMB\x01\x00k<\\x90\x0c\x9f')
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 38
DEBUG:rtp:sender(video) > RtpPacket(seq=18100, ts=2365383046, marker=1, payload=96, 1227 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1257
DEBUG:rtp:receiver(video) > RtcpRrPacket(ssrc=2596041375, reports=[RtcpReceiverInfo(ssrc=1552944287, fraction_lost=0, packets_lost=0, highest_sequence=46795, jitter=1783, lsr=644417840, dlsr=5232)])
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 46
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 172
DEBUG:dtls:server x DTLS handling timeout
DEBUG:rtp:receiver(video) < RtpPacket(seq=46796, ts=4163459051, marker=1, payload=96, 138 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 233
DEBUG:rtp:receiver(video) < RtpPacket(seq=46797, ts=4163462291, marker=1, payload=96, 199 bytes)
DEBUG:rtp:sender(video) > RtpPacket(seq=18101, ts=2365386046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18102, ts=2365386046, marker=1, payload=96, 469 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 499
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 46
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 141
DEBUG:rtp:receiver(video) < RtcpRrPacket(ssrc=1552944287, reports=[RtcpReceiverInfo(ssrc=2596041375, fraction_lost=0, packets_lost=0, highest_sequence=18102, jitter=2118, lsr=648224186, dlsr=16801)])
DEBUG:rtp:receiver(video) < RtpPacket(seq=46798, ts=4163465171, marker=1, payload=96, 107 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 108
DEBUG:rtp:receiver(video) < RtpPacket(seq=46799, ts=4163468051, marker=1, payload=96, 74 bytes)
DEBUG:rtp:sender(video) > RtpPacket(seq=18103, ts=2365389046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18104, ts=2365389046, marker=1, payload=96, 47 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 77
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 153
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 94
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 142
DEBUG:rtp:receiver(video) < RtpPacket(seq=46800, ts=4163471291, marker=1, payload=96, 119 bytes)
DEBUG:rtp:receiver(video) > RtcpPsfbPacket(fmt=15, ssrc=2596041375, media_ssrc=0, fci=b'REMB\x01\x00e\xb5\\x90\x0c\x9f')
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 38
DEBUG:rtp:receiver(video) < RtcpSrPacket(ssrc=1552944287, sender_info=RtcpSenderInfo(ntp_timestamp=16134187898695072306, rtp_timestamp=4163472371, packet_count=31063, octet_count=25441093), reports=[])
DEBUG:rtp:receiver(video) < RtcpSdesPacket(chunks=[RtcpSourceInfo(ssrc=1552944287, items=[(1, b'fu4pTxKHM5aZ9ynp')])])
DEBUG:rtp:receiver(video) < RtcpPsfbPacket(fmt=15, ssrc=1552944287, media_ssrc=0, fci=b'REMB\x01\x06\xb8\xb9\x9a\xbcr\x9f')
DEBUG:rtp:sender(video) - receiver estimated maximum bitrate 356722 bps
DEBUG:rtp:receiver(video) < RtpPacket(seq=46801, ts=4163474171, marker=1, payload=96, 108 bytes)
DEBUG:rtp:receiver(video) > RtcpPsfbPacket(fmt=15, ssrc=2596041375, media_ssrc=0, fci=b'REMB\x01\x00d\xa5\\x90\x0c\x9f')
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 38
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 154
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\xdb?B6\xb6QzE)\x0b~{')
DEBUG:rtp:receiver(video) < RtpPacket(seq=46802, ts=4163477051, marker=1, payload=96, 120 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b'\xdb?B6\xb6QzE)\x0b~{')
DEBUG:rtp:sender(video) > RtpPacket(seq=18105, ts=2365392046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18106, ts=2365392046, marker=1, payload=96, 288 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 318
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 148
DEBUG:rtp:receiver(video) < RtpPacket(seq=46803, ts=4163480291, marker=1, payload=96, 114 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 174
DEBUG:rtp:receiver(video) < RtpPacket(seq=46804, ts=4163483171, marker=1, payload=96, 140 bytes)
DEBUG:rtp:sender(video) > RtpPacket(seq=18107, ts=2365395046, marker=1, payload=96, 1045 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1075
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 139
DEBUG:rtp:receiver(video) < RtpPacket(seq=46805, ts=4163486051, marker=1, payload=96, 105 bytes)
DEBUG:rtp:sender(video) > RtpPacket(seq=18108, ts=2365398046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18109, ts=2365398046, marker=1, payload=96, 649 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 679
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 190
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'k8ZKJu/T8jxQ')
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b'k8ZKJu/T8jxQ')
DEBUG:rtp:receiver(video) < RtpPacket(seq=46806, ts=4163489291, marker=1, payload=96, 156 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 174
DEBUG:rtp:sender(video) > RtpPacket(seq=18110, ts=2365401046, marker=1, payload=96, 1295 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1325
DEBUG:rtp:receiver(video) < RtpPacket(seq=46807, ts=4163492171, marker=1, payload=96, 140 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 94
DEBUG:rtp:receiver(video) < RtcpSrPacket(ssrc=1552944287, sender_info=RtcpSenderInfo(ntp_timestamp=16134187899775097667, rtp_timestamp=4163495051, packet_count=31070, octet_count=25441976), reports=[])
DEBUG:rtp:receiver(video) < RtcpSdesPacket(chunks=[RtcpSourceInfo(ssrc=1552944287, items=[(1, b'fu4pTxKHM5aZ9ynp')])])
DEBUG:rtp:receiver(video) < RtcpPsfbPacket(fmt=15, ssrc=1552944287, media_ssrc=0, fci=b'REMB\x01\x06\xb8\xb9\x9a\xbcr\x9f')
DEBUG:rtp:sender(video) - receiver estimated maximum bitrate 356722 bps
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 175
DEBUG:rtp:receiver(video) < RtpPacket(seq=46808, ts=4163495051, marker=1, payload=96, 141 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 143
DEBUG:rtp:receiver(video) < RtpPacket(seq=46809, ts=4163498291, marker=1, payload=96, 109 bytes)
DEBUG:rtp:sender(video) > RtpPacket(seq=18111, ts=2365404046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18112, ts=2365404046, marker=1, payload=96, 282 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 312
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 189
DEBUG:rtp:receiver(video) < RtpPacket(seq=46810, ts=4163501171, marker=1, payload=96, 155 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 184
DEBUG:rtp:sender(video) > RtpPacket(seq=18113, ts=2365407046, marker=1, payload=96, 1110 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1140
DEBUG:rtp:receiver(video) < RtpPacket(seq=46811, ts=4163504051, marker=1, payload=96, 150 bytes)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 227
DEBUG:rtp:sender(video) > RtpPacket(seq=18114, ts=2365410046, marker=0, payload=96, 1300 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 1330
DEBUG:rtp:sender(video) > RtpPacket(seq=18115, ts=2365410046, marker=1, payload=96, 390 bytes)
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 420
DEBUG:rtp:receiver(video) < RtpPacket(seq=46812, ts=4163507291, marker=1, payload=96, 193 bytes)
DEBUG:rtp:receiver(video) > RtcpPsfbPacket(fmt=15, ssrc=2596041375, media_ssrc=0, fci=b'REMB\x01\x00j[\\x90\x0c\x9f')
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 38
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 220
DEBUG:rtp:receiver(video) < RtpPacket(seq=46813, ts=4163510171, marker=1, payload=96, 186 bytes)
DEBUG:rtp:receiver(video) > RtcpPsfbPacket(fmt=15, ssrc=2596041375, media_ssrc=0, fci=b'REMB\x01\x00oL\\x90\x0c\x9f')
DEBUG:ice:Connection(0) protocol(1) > ('192.168.12.46', 55563) DATA 38
DEBUG:websockets.protocol:client > Frame(fin=True, opcode=9, data=b'\x08\xbd\xe6\x05', rsv1=False, rsv2=False, rsv3=False)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.12.46', 55563) DATA 150
DEBUG:websockets.protocol:client - event = connection_lost(None)
DEBUG:websockets.protocol:client - state = CLOSED
DEBUG:websockets.protocol:client x code = 1006, reason = [no reason]
DEBUG:websockets.protocol:client - aborted pending ping: 08bde605
DEBUG:websockets.protocol:client ! failing WebSocket connection in the CLOSED state: 1006 [no reason]
DEBUG:rtp:receiver(video) < RtpPacket(seq=46814, ts=4163513051, marker=1, payload=96, 116 bytes)
DEBUG:websockets.protocol:client x closing TCP connection
Traceback (most recent call last):
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/protocol.py", line 674, in transfer_data
message = yield from self.read_message()
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/protocol.py", line 742, in read_message
frame = yield from self.read_data_frame(max_size=self.max_size)
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/protocol.py", line 815, in read_data_frame
frame = yield from self.read_frame(max_size)
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/protocol.py", line 884, in read_frame
extensions=self.extensions,
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/framing.py", line 99, in read
data = yield from reader(2)
File "/home/test/anaconda3/lib/python3.6/asyncio/streams.py", line 672, in readexactly
raise IncompleteReadError(incomplete, n)
asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "apprtc.py", line 186, in
loop.run_until_complete(signaling.close())
File "/home/test/anaconda3/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete
return future.result()
File "apprtc.py", line 47, in close
await self.send(None)
File "apprtc.py", line 64, in send
'msg': message,
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/protocol.py", line 462, in send
yield from self.ensure_open()
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/protocol.py", line 646, in ensure_open
) from self.transfer_data_exc
websockets.exceptions.ConnectionClosed: WebSocket connection is closed: code = 1006 (connection closed abnormally [internal]), no reason
invalid