twilio / twilio-video.js

Twilio’s Programmable Video JavaScript SDK
https://www.twilio.com/docs/video/javascript
Other
571 stars 217 forks source link

Connecting to room on Android 12 over cellular causes entire device network interface to disconnect #1649

Closed futurealecks closed 2 years ago

futurealecks commented 2 years ago

Expected behavior:

User should be able to connect without cellular network drop.

Actual behavior:

When a Twilio video participant joins a room from an Android 12 device over cellular (tested multiple Verizon SIMs throughout the US) the cellular radio completely drops, resets, then drops again. This occurs in a continuous loop.

As soon as the the Verizon user joins the call it's cellular interface drops.

11-19 09:17:20.955   873   882 I WPKTRT  : process_address_event: 100.123.Y.Z removed from rmnet1
11-19 09:17:20.957 20506 20918 V NativeCrypto: Read error: ssl=0xb400006dd5d6a418: I/O error during system call, Software caused connection abort

"Software caused connection abort":

11-19 09:17:20.964 13960 20873 E CarrierServices: [454] eyb.run: (RCS): : Error while receiving message: Software caused connection abort: java.net.SocketException: Software caused connection abort
11-19 09:17:20.964 13960 20873 E CarrierServices:   at java.net.SocketInputStream.socketRead0(Native Method)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at java.net.SocketInputStream.socketRead(SocketInputStream.java:119)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at java.net.SocketInputStream.read(SocketInputStream.java:176)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at java.net.SocketInputStream.read(SocketInputStream.java:144)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:945)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:909)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readUntilDataAvailable(ConscryptEngineSocket.java:824)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.read(ConscryptEngineSocket.java:797)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at java.io.BufferedInputStream.fill(BufferedInputStream.java:248)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at java.io.BufferedInputStream.read(BufferedInputStream.java:267)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at dgo.a(PG:2)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at exb.a(PG:3)
11-19 09:17:20.964 13960 20873 E CarrierServices:   at eyb.run(PG:6)
11-19 09:17:20.965 13960 20873 I CarrierServices: [454] cpg.b: Using config server URL from bcy
11-19 09:17:20.966 14002 20852 V NativeCrypto: Read error: ssl=0xb400006dd5dc2858: I/O error during system call, Software caused connection abort
11-19 09:17:20.975 20506 21563 V Twilio  : [Core](465699421360): WebSocket::Implementation::on_read
11-19 09:17:20.975 20506 21563 W Twilio  : [Core](465699421360): Closing the connection due a system error 103 while reading: Software caused connection abort
11-19 09:17:20.975 20506 21563 V Twilio  : [Core](465699421360): WebSocket::Implementation::on_close
11-19 09:17:20.975 20506 21563 W Twilio  : [Core](465699421360): The WebSocket was closed with a system error, code 103: Software caused connection abort
11-19 09:17:20.975 18014 20832 V NativeCrypto: Write error: ssl=0xb400006dd5d71918: I/O error during system call, Broken pipe

The device reconnects and attempts to connect to the room again. The process loops:

11-19 09:17:20.977 20506 21372 D Twilio  : [Core](466788527280): <0xb400006e15db2f50> Reconnecting, starting session expiry timer. timeout: 30s
11-19 09:17:20.977 20506 21372 V Twilio  : [Core](466788527280): <0xb400006e15db2f50> TcmpSignaling::startReconnectionTimer: session_state: kReconnecting
11-19 09:17:20.977 20506 21372 D Twilio  : [Core](466788527280): The network is reachable, retrying connection in 95 ms.
11-19 09:17:20.977 20506 21372 V Twilio  : [Core](466788527280): <0xb400006e15db2f50> TcmpSignaling::closeConnection: Completed for 5baa8be1-6ea5-4498-b782-5a88d6e98870. session_state: kReconnecting

Showing the cellular connection to fail:

11-19 09:17:21.007  2186 21594 D NetworkMonitor/134: PROBE_DNS connectivitycheck.gstatic.com 2ms FAIL in type ADDRCONFIG android.net.DnsResolver$DnsException: android.system.ErrnoException: resNetworkQuery failed: ENONET (Machine is not on the network)
11-19 09:17:21.008 13960 14022 I CarrierServices: [190] cde.c: (RCS): : Exit RegisteredState
11-19 09:17:21.008  2186 21593 D NetworkMonitor/134: PROBE_DNS www.google.com 3ms FAIL in type ADDRCONFIG android.net.DnsResolver$DnsException: android.system.ErrnoException: resNetworkQuery failed: ENONET (Machine is not on the network)
11-19 09:17:21.010  2186 21594 D NetworkMonitor/134: PROBE_HTTP http://connectivitycheck.gstatic.com/generate_204 Probe failed with exception java.net.UnknownHostException: Unable to resolve host "connectivitycheck.gstatic.com": No address associated with hostname
11-19 09:17:21.012  2186 21593 D NetworkMonitor/134: PROBE_HTTPS https://www.google.com/generate_204 Probe failed with exception java.net.UnknownHostException: Unable to resolve host "www.google.com": No address associated with hostname
11-19 09:17:21.015  2186 21592 D NetworkMonitor/134: PROBE_FALLBACK http://www.google.com/gen_204 Probe failed with exception java.net.UnknownHostException: Unable to resolve host "www.google.com": No address associated with hostname
...
11-19 09:17:21.024 20131 21347 V NativeCrypto: SSL shutdown failed: ssl=0xb400006dd5d75098: I/O error during system call, Success
11-19 09:17:21.024  1518  1792 I GnssNetworkConnectivityHandler: Network connection lost. Available networks count: 0
11-19 09:17:21.024  1518  1792 I GnssNetworkConnectivityHandler: updateNetworkState, state=CLOSED, connected=false, network=134, capabilities=[ Transports: CELLULAR Capabilities: SUPL&DUN&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&NOT_CONGESTED&NOT_SUSPENDED&NOT_VCN_MANAGED LinkUpBandwidth>=15000Kbps LinkDnBandwidth>=30000Kbps Specifier: <TelephonyNetworkSpecifier [mSubId = 1]> SubscriptionIds: {1}], apn: VZWINTERNET, availableNetworkCount: 0

cellular_connection

Possibly relates to:

Software versions:

charliesantos commented 2 years ago

Hi @futurealecks , are you using android webview?

futurealecks commented 2 years ago

Hello @charliesantos , no we are not using webview.

charliesantos commented 2 years ago

@futurealecks thanks for confirming. What did you mean by twilio-video.js: 7.0.2 within native Android app? Are you using the Android SDK or JavaScript SDK?

futurealecks commented 2 years ago

@charliesantos: We're using the Android SDK com.twilio:video-android:7.0.2.

charliesantos commented 2 years ago

Thanks @futurealecks . This repo is for twilio-video JS. Please submit the issue to twilio-video Android instead https://github.com/twilio/video-quickstart-android.