New issue
Advanced search Search tips

Issue 709558 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Enhancement request: allow programatically setting idle socket timeout through Android API

Reported by chad.hay...@gmail.com, Apr 7 2017

Issue description

Steps to reproduce the problem:
We have an enterprise web application in which the login happens through a custom Identity Provider (IdP).  We deploy our application shell on managed enterprise Android devices (these are not consumer based devices).  The native shell application uses the Android WebView in order to show our login page.

We recently encountered an issue at one of our client sites where an outbound firewall was silently tearing down connections to our servers after a 1 minute idle period.  The firewall was not sending any RST or FIN packets to the device, so the OS would not tear down the connections.  This ultimately let our end users get into a situation where if they loaded our login page, let the device sit between 2 and 5 minutes, and tried to log in, the login would "hang" for several minutes until it eventually timed out.

After several days of investigation we discovered the requests were getting "stalled" (or black-holed), because of the firewall silently tearing down connections.  Upon looking at the Chromium source code we found that it will reuse idle socket connections for up to 5 minutes [1].  We also found that Chromium on Android will not sent TCP keepalives [2], so we can't prevent these socket connections from being closed by the firewall.

[1] https://chromium.googlesource.com/chromium/src.git/+/50.0.2661.86/net/socket/client_socket_pool.cc#18
[2] https://chromium.googlesource.com/chromium/src.git/+/50.0.2661.86/net/socket/tcp_socket_posix.cc#365 

What is the expected behavior?
The proposed solution is to allow developers to set the idle socket timeout through an Android API.  This could be a part of the WebView class or another system level API.

What went wrong?
Currently there is no way to configure the idle socket timeout without building a custom version of Chromium.  Since we do not control the OS, it is our understanding that we cannot install a custom System WebView APK without root privileges (something we do not have).

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 50.0.2661.86  Channel: n/a
OS Version: 6.0.1
Flash Version:
 
Components: Mobile>WebView
Owner: sgu...@chromium.org
Status: Assigned (was: Unconfirmed)
I will look at it, but unlikely. 
Thank you.  Are there alternatives or other ways for us to get a custom Chromium build on a device without root privileges?  I'm not opposed to building our own version, just unsure how we deploy it.
something to replace Webview package on nonroot devices? no.


Comment 5 by ricea@chromium.org, Apr 14 2017

Components: -Blink>Network Internals>Network
Hi, wanted to see if there's been any progress on this?
this did not go anywhere in Android O.
Cc: eroman@chromium.org mmenke@chromium.org
Owner: ----
Status: Available (was: Assigned)
I am going to send it to network team to comment on. Perhaps there is a different solution.
Labels: -Pri-2 Pri-3
Status: Archived (was: Available)
The network stack team isn't terribly interested in implementing this, unless there's a need seen by the WebView team.

Comment 11 by torne@chromium.org, Apr 25 2018

Yeah unfortunately I think this has been the only request for this we've come across, so it's hard to justify.

Sign in to add a comment