New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 881123 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Add new VPN configuration only fires App Launch Intent with no extra information/action

Reported by f5mobile...@gmail.com, Sep 5

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS aarch64 10575.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
1. Goto ChromeOS settings --> Network --> VPN --> Click '+'

What is the expected behavior?
VPN client should open with add configuration screen

What went wrong?
ChromeOS does not pass any extra information to the VPN client app saying user is trying to create a new configuration. ChromeOS just fires a generic app launch intent. As a result the app is brought to the foreground with its previous state.

Did this work before? No 

Chrome version: 67.0.3396.99  Channel: n/a
OS Version: 10575.58.0
Flash Version:
 
Components: -Enterprise UI>Settings Internals>Network>VPN
Cc: hugobenichi@chromium.org
hugobenichi for clarification
Cc: bartfab@chromium.org benchan@chromium.org
Cc: abhishekbh@chromium.org
It sounds like the expectations were that the UI for handling VPN network creation would redirect to a specific Android app installed on the device. Is that correct ?

Ben, Abhishek: do you know if we have any fine grained way to start a VPN app from the host and specify the VPN config ?
I don't think the ask is to specify a VPN config. It is to give the app a hint (via an Intent extra) that the user is trying to create a new config, so that the app can open the appropriate Activity, rather than the app's default main screen.
The user is trying to set a VPN config on Chrome OS. Why should we open an Android app to do this ?. I think we shouldn't try to be too smart here. Am I missing something ?
Cc: steve...@chromium.org benchang@chromium.org kirtika@chromium.org khmel@chromium.org
Moving our discussion from e-mail to here.

Once you install at least one Android VPN client, Chrome OS settings gains a new menu item, "Add Android VPN..." Clicking this should bring up a list of available VPN clients. IIUC, selecting one of these launches the VPN client's main UI. The request is to supply some Intent extra that will tell the VPN client the user is trying to add a new connection, so that it can show appropriate UI.

In my experiments with the OpenVPN client, the settings UI actually completely misbehaved: I saw "Add Android VPN...," but clicking on it just brought up an empty page. So there may be a regression to fix here first. But once we are past that, the feature request stands.

Adding a few more knowledgeable people from the thread. Steven took a quick look at the code and came up with the following:

Searching the code:
* onAddArcVpnTap_: https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/internet_page/internet_subpage.js?sq=package:chromium&dr&g=0&l=425
-> InternetHandler::AddThirdPartyVpn: https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/settings/chromeos/internet_handler.cc?type=cs&q=addThirdPartyVpn&g=0&l=138
-> arc::LaunchApp:Â https://cs.chromium.org/chromium/src/chrome/browser/ui/app_list/arc/arc_app_utils.cc?type=cs&g=0&l=222

It looks like the translation from an Arc VPN config to an ONC VPN entry occurs here:
* https://cs.chromium.org/chromium/src/components/arc/net/arc_net_host_impl.cc?type=cs&q=ARCVPN&sq=package:chromium&g=0&l=860
Cc: lgcheng@chromium.org
+Long
Could f5mobileteam@gmail.com comment on the extra information they expect the VPN app would get from the launcher ?
Would expect launcher to post an Intent with following extras: (recommendation)
1. EXTRA_IS_LAUNCHED_BY_SYSTEM : true
2. EXTRA_LAUNCH_ACTION : addConfig/startVPN/deleteConfig etc

It was designed like that.

When click on the the "+" button
For ChromeOS system built in VPN, we show the built in VPN config dialog.

For Third party VPN extension, we ask the app to show its VPN config page 
https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/settings/chromeos/internet_handler.cc?type=cs&q=addThirdPartyVpn+file:%5Esrc/+package:%5Echromium$&g=0&l=163

For Arc VPN app, we launch the VPN app. (I believe Android don't have API to ask app to show VPN config page or many app does not support this. Many Android VPN just let you pick their preset VPN config to connect)

See go/arc++vpn for detail.
When ARC VPN app is installed on arc supported Chromebook, the Chrome VPN menu includes this ARC VPN app also alongside built-in ChromeOS VPN and  ChromeOS 3rd party VPN apps.  

Your Comment:
"For Arc VPN app, we launch the VPN app. (I believe Android don't have API to ask app to show VPN config page or many app does not support this. Many Android VPN just let you pick their preset VPN config to connect)"


1. In ChromeOS VPN settings --> If the user clicks on add(+) new config directed to ARC VPN app --> you mean to say there is no means for the ARC VPN app to know what action the user is trying to accomplish? This will result in the default launch of the ARC VPN app generic launcher intent.

2. Does it mean this feature won't be supported?  



We definitely should fire the default launch intent that every Android app is bound to handle. But nothing prevents us from including an intent extra that hints at the user's intentions. VPN clients unaware of this new extra will just ignore it and show their default UI. VPN clients that know about the intent extra will evaluate it and directly advance to the appropriate UI, e.g. the "add new connection" dialog.

I think this is a very reasonable and doable FR.
Labels: Enterprise-Triaged

Sign in to add a comment