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

Issue 734241 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Timing out when attempting to connect to host results in bad UI

Project Member Reported by hansberry@chromium.org, Jun 16 2017

Issue description

Attempt to connect to host and then simulate a failure by killing BT on the host after a few seconds.

A dialog pops up saying "Join WiFi network" prompting your for the password to the host's hotspot. A few seconds later, a notification will dispplay saying "Failed to connect to network '[hotspot name]'. Out of range."
 
Can you include logs with this bug? I would like to be able to diagnose the problem more closely. Because we see a "failed to connect" notification, I'm assuming that a connection to the hotspot is never established and that the hotspot is turned off on the phone while the Chromebook is in the middle of the connection attempt.

Does the dialog ever disappear in this case? Or are we left with both a dialog and a failure notification?

From reading your explanation, it sounds like the following happened:
(a) Chromebook requests a connection, Android enables hotspot and sends back credentials.
(b) Chromebook starts connecting but does not complete connection attempt.
(c) Android disables Bluetooth, which disables Instant Tethering. Hotspot is disabled on phone.
(d) Chromebook cannot complete connection attempt since hotspot is turned off.
(e) Chromebook displays the dialog and notification you mentioned.

There are two things we should be doing:
(1) We should display a "connection to host failed" dialog. This isn't done yet, but the notification already exists (see [1]).
(2) If possible, we should hide the Wi-Fi connection failure dialog and notification shown by the system. I'm not sure if this is possible, but I haven't done any digging to see whether this is plausible. Can you look into this?

[1] https://cs.chromium.org/chromium/src/chromeos/components/tether/notification_presenter.h?q=NotifyConnectionToHostFailed
Summary: Timing out when attempting to connect to host results in bad UI (was: Failing to connect to host results in bad UI)
Better way to repro this:

1) Begin connection to host
2) As soon as the host turn its hotspot on, manually turn it off (I recommend doing so via quick settings)
3) Let the client timeout trying to connect to a hotspot that doesn't exist.
4) Observe.

The dialog and notification never disappear. A picture has been attached.

Logs are attached as well.
br.jpg
64.7 KB View Download
logs.txt
10.4 KB View Download
I actually believe that we should hide both of these UI elements, and only show our "connection failed" notification. Clearly the OS paradigm is already to only show a notification when a connection fails, so we should follow that. Thoughts? 
Yep, that's what I meant in point (2) in my earlier comment. Can you investigate whether the dialog/notification from the system can be suppressed?
Owner: hansberry@chromium.org
Status: Assigned (was: Available)
Great. I'll take this bug on and investigate what you mentioned, but I may not be able to get to it until early next week.
Note that this symptom also occurs when Wi-Fi is disabled. Please confirm that your fix for this issue also fixes the same issue in that case.

See https://bugs.chromium.org/p/chromium/issues/detail?id=738540.
Cc: jonmann@chromium.org
Owner: ----
Status: Available (was: Assigned)
Another thing to fix here: If we fail to connect, we also must clear the old Wi-Fi network configuration.
Owner: khorimoto@chromium.org
Status: Started (was: Available)
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/de4ffadb1dad60c1a1650b86cc22a0fb73fbc5d9

commit de4ffadb1dad60c1a1650b86cc22a0fb73fbc5d9
Author: Kyle Horimoto <khorimoto@google.com>
Date: Tue Jul 18 00:16:00 2017

[CrOS Tether] Show the "connection to host failed" notification when a Tether connection attempt fails.

The notification is removed when it is clicked or when a new connection attempt
is started.

Bug: 672263,  734241 
Change-Id: I985554345796b953c166024e4bcddf141703591f
Reviewed-on: https://chromium-review.googlesource.com/575526
Reviewed-by: Ryan Hansberry <hansberry@chromium.org>
Commit-Queue: Ryan Hansberry <hansberry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487312}
[modify] https://crrev.com/de4ffadb1dad60c1a1650b86cc22a0fb73fbc5d9/chromeos/components/tether/tether_connector.cc
[modify] https://crrev.com/de4ffadb1dad60c1a1650b86cc22a0fb73fbc5d9/chromeos/components/tether/tether_connector_unittest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f1cb8c2adb6e0f3971dd1d541ee312a7601cedae

commit f1cb8c2adb6e0f3971dd1d541ee312a7601cedae
Author: Kyle Horimoto <khorimoto@google.com>
Date: Tue Jul 18 23:28:25 2017

[CrOS Tether] When a connection to a Tether network fails, do not show an additional error notification for the associated Wi-Fi connection.

Without this CL, two notifications are shown: one for the connection failure of
the Tether network, and one for its underlying Wi-Fi network. This CL prevents
the additional notification from being shown.

Bug: 672263,  734241 
Change-Id: I100062d08b718adda6941997ba68899e450c5ea8
Reviewed-on: https://chromium-review.googlesource.com/575010
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487667}
[modify] https://crrev.com/f1cb8c2adb6e0f3971dd1d541ee312a7601cedae/chrome/browser/chromeos/net/network_state_notifier.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2fcdd3012efa8bce991431cf0457f86cb31a8d2a

commit 2fcdd3012efa8bce991431cf0457f86cb31a8d2a
Author: Kyle Horimoto <khorimoto@google.com>
Date: Tue Jul 18 23:48:16 2017

[CrOS Tether] Do not display network configuration dialog for the underlying Wi-Fi network when a Tether connection fails.

This dialog is not appropriate in this case because the Tether component already
displays relevant UI for a failed connection.

Bug: 672263,  734241 
Change-Id: Ib826d77068f330d3c18e245e876c0bb1a660594f
Reviewed-on: https://chromium-review.googlesource.com/575514
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487670}
[modify] https://crrev.com/2fcdd3012efa8bce991431cf0457f86cb31a8d2a/chromeos/network/network_connect.cc
[modify] https://crrev.com/2fcdd3012efa8bce991431cf0457f86cb31a8d2a/chromeos/network/network_connect_unittest.cc

Status: Fixed (was: Started)

Comment 14 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment