I can't get the AppRTC Android example app to keep a video connection alive between two AppRTC apps consistently.
I'm using x86 emulators and real x86 hardware. The x86 emulators run SDK 22 and the x86 hardware SDK 22. I keep getting ICE Disconnected after random time. The devices are all on the same LAN.
I've tried both the release libjingle libs and debug version.
I would really appreciate any help with this, I've been working on it for weeks.
What steps will reproduce the problem?
1. Build android webrtc example from head source code from March 30th, 2016.
2. Connect two clients running x86 android (arm likely has same issue but untested)
3. Wait a few minutes leaving the video running.
What is the expected result?
The call should stay connected indefinitely.
What do you see instead?
The call disconnects on its own after a few minutes, sometimes only one minute or less.
What version of the product are you using? On what operating system?
Android Marshmallow x86. Both using Genymotion, the Android Studio Emulator and real x86 native hardware (Intel NUC).
Please provide any additional information below.
The two devices are on the same LAN, so no TURN usage should be occurring. After a minute or two, the video disconnects. It appears there may be some ping timeouts, but ultimately the IceConnectionState goes from 2 => 5.
I've been debugging this for days and don't understand why it's occurring. I would appreciate any help, hopefully I am just doing something wrong.
Here is the final log output before the disconnection:
I/libjingle(24433): (videoadapter.cc:313): VAdapt Frame: scaled 0 / out 1710 / in 1710 Changes: 0 Input: 640x480 i1000000000 Scale: 1 Output: 640x480 i1000000000 Changed: false
W/ActivityManager( 1950): getTasks: caller 10012 is using old GET_TASKS but privileged; allowing
I/VideoCapturerAndroid(24433): VideoCapturerAndroid: Camera fps: 29.
I/libjingle(24433): (port.cc:926): Jingle:Conn[0xe26fdd00:audio:5+E+C0XA:1:0:local:udp:10.150.150.x:43340->Wu7KE9yG:1:1853759231:prflx:udp:10.150.150.x:57247|CRxW|7961835276047629822|-]: Received STUN ping, id=657652515170354c50694579
I/libjingle(24433): (port.cc:584): Jingle:Port[0xe26f2880:audio:1:0::Net[wlan0:10.150.150.x/23:Wifi]]: Sent STUN ping response, to=10.150.150.x:57247, id=657652515170354c50694579
W/ActivityManager( 1950): getTasks: caller 10012 is using old GET_TASKS but privileged; allowing
W/ActivityManager( 1950): getTasks: caller 10012 is using old GET_TASKS but privileged; allowing
W/ActivityManager( 1950): getTasks: caller 10012 is using old GET_TASKS but privileged; allowing
W/ActivityManager( 1950): getTasks: caller 10012 is using old GET_TASKS but privileged; allowing
I/libjingle(24433): (port.cc:1283): Jingle:Conn[0xe26f2100:audio:5+E+C0XA:1:0:local:udp:10.150.150.x:43340->LBIlT5pI:1:1853824767:prflx:udp:10.150.150.x:60278|CRWI|7962116751024340478|730]: Timing-out STUN ping 6c6f426e357071685578686e after 5000 ms
V/WEBRTC (24433): APICALL ; (19:44:37: 43 | 1) VOICE: 1 99; 24493; SetMinimumPlayoutDelay(channel=0, delayMs=604)
W/ActivityManager( 1950): getTasks: caller 10012 is using old GET_TASKS but privileged; allowing
W/ActivityManager( 1950): getTasks: caller 10012 is using old GET_TASKS but privileged; allowing
W/ActivityManager( 1950): getTasks: caller 10012 is using old GET_TASKS but privileged; allowing
D/wpa_supplicant( 2313): wlan0: Control interface command 'SIGNAL_POLL'
W/ActivityManager( 1950): getTasks: caller 10012 is using old GET_TASKS but privileged; allowing
I/libjingle(24433): (port.cc:1283): Jingle:Conn[0xe26f2100:audio:5+E+C0XA:1:0:local:udp:10.150.150.x:43340->LBIlT5pI:1:1853824767:prflx:udp:10.150.150.x:60278|CRWI|7962116751024340478|730]: Timing-out STUN ping 654a39696b5156724f4a7032 after 5001 ms
I/libjingle(24433): (port.cc:1076): Jingle:Conn[0xe26f2100:audio:5+E+C0XA:1:0:local:udp:10.150.150.x:43340->LBIlT5pI:1:1853824767:prflx:udp:10.150.150.x:60278|CRWI|7962116751024340478|730]: Unwritable after 5 ping failures and 5001 ms without a response, ms since last received ping=240 ms since last received data=14 rtt=1460
I/libjingle(24433): (p2ptransportchannel.cc:1546): Selecting connection for triggered check: Conn[0xe26fdd00:audio:5+E+C0XA:1:0:local:udp:10.150.150.x:43340->Wu7KE9yG:1:1853759231:prflx:udp:10.150.150.x:57247|CRxW|7961835276047629822|-]
I/libjingle(24433): (port.cc:1292): Jingle:Conn[0xe26fdd00:audio:5+E+C0XA:1:0:local:udp:10.150.150.x:43340->Wu7KE9yG:1:1853759231:prflx:udp:10.150.150.x:57247|CRxW|7961835276047629822|-]: Sent STUN ping, id=334e4d312b6c487864683431, use_candidate=0
I/libjingle(24433): (transportcontroller.cc:517): audio TransportChannel 1 writability changed to 0.
I/libjingle(24433): (channel.cc:978): Channel not writable (audio)
I/libjingle(24433): (channel.cc:1503): Changing voice state, recv=1 send=1
I/libjingle(24433): (channel.cc:978): Channel not writable (video)
I/libjingle(24433): (webrtcsession.cc:1466): Changing IceConnectionState 2 => 5
I/libjingle(24433): (channel.cc:1735): Changing video state, send=1
D/PCRTCClient(24433): IceConnectionState: DISCONNECTED
D/CallRTCClient(24433): ICE disconnected
-- Using DEBUG libjingle library ---
I/VideoCapturerAndroid( 1453): VideoCapturerAndroid: Camera fps: 11.
V/WEBRTC ( 1453): APICALL ; (15: 6:53:802 | 16) VOICE: 1 99; 3051; SetMinimumPlayoutDelay(channel=1, delayMs=123)
I/libjingle( 1453): (port.cc:1076): Jingle:Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-WI|7962116751024340478|207]: Unwritable after 5 ping failures and 6914 ms without a response, ms since last received ping=8265 ms since last received data=7808 rtt=414
V/WEBRTC ( 1453): APICALL ; (15: 6:54:890 | 88) VOICE: 1 99; 3051; SetMinimumPlayoutDelay(channel=1, delayMs=43)
I/libjingle( 1453): (p2ptransportchannel.cc:1084): Switching best connection: Conn[0xde6d7600:audio:bKJdIMq6:1:0:prflx:udp:10.150.150.65:62874->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-WI|7961835276047629822|47]
I/libjingle( 1453): (p2ptransportchannel.cc:1161): Jingle:Channel[audio|1|_W]: Previous best connection: Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-wI|7962116751024340478|207]
I/libjingle( 1453): (p2ptransportchannel.cc:1164): Jingle:Channel[audio|1|_W]: New best connection: Conn[0xde6d7600:audio:bKJdIMq6:1:0:prflx:udp:10.150.150.65:62874->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-WI|7961835276047629822|47]
I/libjingle( 1453): (call.cc:620): UpdateAggregateNetworkState: aggregate_state=up
I/libjingle( 1453): (call.cc:620): UpdateAggregateNetworkState: aggregate_state=up
I/libjingle( 1453): (port.cc:1292): Jingle:Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-wI|7962116751024340478|207]: Sent STUN ping, id=4c5935437a5262436141704c, use_candidate=1
W/libjingle( 1453): (androidnetworkmonitor_jni.cc:316): Get adapter type for an unknown interface: eth0
I/libjingle( 1453): (network.cc:783): Connect failed with 101
I/libjingle( 1453): (vie_receiver.cc:206): Packet received on SSRC: 3273006610 with payload type: 116, timestamp: 708789734, sequence number: 31695, arrival time: 149153, abs send time: 13694665
I/libjingle( 1453): (remote_ntp_time_estimator.cc:66): RTP timestamp: 708789734 in NTP clock: 3668526410007 estimated time in receiver clock: 140701 converted to NTP clock: 3668526406828
I/libjingle( 1453): (port.cc:926): Jingle:Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|CRwI|7962116751024340478|207]: Received STUN ping, id=4a70486a6443657441442b38
I/libjingle( 1453): (port.cc:584): Jingle:Port[0xe1e8de80:audio:1:0::Net[eth0:192.168.56.0/24:Unknown]]: Sent STUN ping response, to=10.150.150.72:60315, id=4a70486a6443657441442b38
I/VideoCapturerAndroid( 1453): VideoCapturerAndroid: Camera fps: 13.
W/libjingle( 1453): (rtp_rtcp_impl.cc:168): virtual void webrtc::ModuleRtpRtcpImpl::Process(): Timeout: No RTCP RR received.
W/libjingle( 1453): (rtp_rtcp_impl.cc:170): virtual void webrtc::ModuleRtpRtcpImpl::Process(): Timeout: No increase in RTCP RR extended highest sequence number.
V/WEBRTC ( 1453): APICALL ; (15: 6:55:891 | 1) VOICE: 1 99; 3051; SetMinimumPlayoutDelay(channel=1, delayMs=43)
I/libjingle( 1453): (p2ptransportchannel.cc:1548): Selecting connection for triggered check: Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|CRwI|7962116751024340478|207]
I/libjingle( 1453): (port.cc:1292): Jingle:Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|CRwI|7962116751024340478|207]: Sent STUN ping, id=7653794e544f3854435a3262, use_candidate=1
W/art ( 1453): Suspending all threads took: 48.731ms
V/WEBRTC ( 1453): APICALL ; (15: 6:56:898 | 7) VOICE: 1 99; 3051; SetMinimumPlayoutDelay(channel=1, delayMs=43)
W/libjingle( 1453): (androidnetworkmonitor_jni.cc:316): Get adapter type for an unknown interface: eth0
I/libjingle( 1453): (network.cc:783): Connect failed with 101
W/art ( 1453): Suspending all threads took: 70.985ms
I/libjingle( 1453): (port.cc:1292): Jingle:Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|CRwI|7962116751024340478|207]: Sent STUN ping, id=385a69317668737a4646486d, use_candidate=1
I/VideoCapturerAndroid( 1453): VideoCapturerAndroid: Camera fps: 13.
V/WEBRTC ( 1453): APICALL ; (15: 6:57:905 | 7) VOICE: 1 99; 3051; SetMinimumPlayoutDelay(channel=1, delayMs=43)
D/PCRTCClient( 1453): IceConnectionReceiving changed to false
I/libjingle( 1453): (port.cc:1292): Jingle:Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-wI|7962116751024340478|207]: Sent STUN ping, id=772f356a4e74334542746a36, use_candidate=1
I/libjingle( 1453): (port.cc:1292): Jingle:Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-wI|7962116751024340478|207]: Sent STUN ping, id=6949786a6d7955395647635a, use_candidate=1
W/libjingle( 1453): (rtp_rtcp_impl.cc:168): virtual void webrtc::ModuleRtpRtcpImpl::Process(): Timeout: No RTCP RR received.
W/libjingle( 1453): (rtp_rtcp_impl.cc:170): virtual void webrtc::ModuleRtpRtcpImpl::Process(): Timeout: No increase in RTCP RR extended highest sequence number.
I/libjingle( 1453): (port.cc:1076): Jingle:Conn[0xde6d7600:audio:bKJdIMq6:1:0:prflx:udp:10.150.150.65:62874->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-WI|7961835276047629822|47]: Unwritable after 5 ping failures and 5273 ms without a response, ms since last received ping=3318 ms since last received data=152503 rtt=100
I/libjingle( 1453): (port.cc:1292): Jingle:Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-wI|7962116751024340478|207]: Sent STUN ping, id=4c6a5a45385436695756614b, use_candidate=1
I/libjingle( 1453): (videoadapter.cc:313): VAdapt Frame: scaled 92 / out 720 / in 720 Changes: 1 Input: 640x480 i33333333 Scale: 0.75 Output: 480x360 i33333333 Changed: false
I/libjingle( 1453): (p2ptransportchannel.cc:1084): Switching best connection: Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-wI|7962116751024340478|207]
I/libjingle( 1453): (p2ptransportchannel.cc:1161): Jingle:Channel[audio|1|_W]: Previous best connection: Conn[0xde6d7600:audio:bKJdIMq6:1:0:prflx:udp:10.150.150.65:62874->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-wI|7961835276047629822|47]
I/libjingle( 1453): (p2ptransportchannel.cc:1164): Jingle:Channel[audio|1|_W]: New best connection: Conn[0xde6d7880:audio:M5NHBZyF:1:0:prflx:udp:10.150.150.65:64768->eYV5VLC8:1:2122260223:local:udp:10.150.150.72:60315|C-wI|7962116751024340478|207]
I/libjingle( 1453): (transportcontroller.cc:517): audio TransportChannel 1 writability changed to 0.
I/libjingle( 1453): (webrtcsession.cc:1466): Changing IceConnectionState 3 => 5
D/PCRTCClient( 1453): IceConnectionState: DISCONNECTED
I/libjingle( 1453): (channel.cc:980): Channel not writable (audio)
I/libjingle( 1453): (channel.cc:1505): Changing voice state, recv=1 send=1
I/libjingle( 1453): (channel.cc:980): Channel not writable (video)
I/libjingle( 1453): (channel.cc:1737): Changing video state, send=1
I/libjingle( 1453): (channel.cc:980): Channel not writable (data)
I/libjingle( 1453): (channel.cc:2112): Changing data state, recv=1 send=1
D/CallRTCClient( 1453): ICE disconnected