New issue
Advanced search Search tips

Issue 650121 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Add timeout + error for users with managed accounts to sign in flow on Android

Project Member Reported by mdw@chromium.org, Sep 26 2016

Issue description

Version: 53.0.2785.125
OS: Android NRD91D on Nexus 9

What steps will reproduce the problem?
(1) Never have run Chrome before (so FRE not run).
(2) Join a network with a captive portal - in this case Emirates Airlines in-air WiFi, which is run by OnAir.
(3) Launch Chrome in an attempt to sign into the WiFi network.

What is the expected output?

The FRE should not allow the user to get stuck due to limited or no connectivity.

What do you see instead?

The FRE runs and I see the screen to sign into my Google account. Selecting the account and clicking the "Continue" button, Chrome apparently freezes. There is no spinner or any other indication that something is happening. There is no way to get out of this state apart from hitting the back button or killing Chrome from the Android recents menu.

I do not believe this is limited to the captive portal use case. After I managed to sign into the captive portal (by avoiding the sign-in flow), I tried the sign-in flow again and it stalled in the same manner. It seems likely that this will happen any time the network is either unable to contact Google or the network is very slow.

My concern is that new users of Chrome in emerging markets will be often faced with this problem due to slow networks or having to sign into a captive portal (which are common in EM). So I think this is likely a serious problem if it is impeding completion of the FRE.

I believe this could be reproduced locally by trying the FRE on, say, GIN-2gpoor which would have similar network performance.



 

Comment 1 by ew...@chromium.org, Sep 26 2016

Cc: gogerald@chromium.org peconn@chromium.org
I'm unable to repro just using my test account using GIN-2g-poor (or just with WiFi off).

Matt - were you trying to sign into your @google.com address? I think we may need to do some additional checks for enterprise accounts during sign in that require network access. +Ganggui and Peter who recently refactored that part of the sign in code.

Even if I'm correct and this is only an issue for enterprise accounts, we should put some timeout + error dialogue in, instead of just spinning forever.
I can reproduce it by disabling wifi with managed account. We might need a timeout mechanism for the first fix, then spin and error screen.

Comment 3 by ew...@chromium.org, Sep 26 2016

Cc: cl...@chromium.org bettes@chromium.org ew...@chromium.org
Labels: M-55 signin-active-bug
Owner: gogerald@chromium.org
Summary: Add timeout + error for users with managed accounts to sign in flow on Android (was: Unable to proceed past sign-in screen on captive portal or slow network)
Got it, so this seems to be specific to managed/enterprise accounts (Matt, let us know if you encountered this with an @gmail.com account). Updating the title accordingly, updating a couple labels, and adding designers for UX input.

Let's:

1) Add a timeout. If the timeout is encountered, we should display a modal error dialogue saying something like "Timed out while trying to sign in to your account managed by <domain name>" (language TBD with UX). We could have a button for "Retry" and a button for "Cancel sign in."
2) Add a spinner (next to the "Continue" button?) to indicate that we're making progress.

Let's focus on (1) first, since that's crucial for this not just being broken. I'll chat with Chris and Alan tomorrow about language/UX. In the meantime Ganggui, can you investigate adding a timeout + error modal in?
Experimented the timeout mechanism, could start the work when language/UX is ready.

Comment 5 by ew...@chromium.org, Sep 29 2016

Final decision on the language:

Unable to sign in
Google took to long to respond
[ CANCEL ] [ RETRY ]
Here is the dialog by using Android default AlertDialog 
Screenshot_2016-09-30-11-03-19.png
99 KB View Download
In addition, how long do we expected to wait? 10s?
Themed AlertDialog used in many places in Chrome. This might be what we want.
Screenshot_2016-09-30-11-22-55.png
99 KB View Download

Comment 9 by ew...@chromium.org, Sep 30 2016

Owner: bettes@chromium.org
#8 LGTM. Alan, can you please confirm the dialogue in Ganggui's most recent screenshot looks good to you?

Ganggui - are there other timeout durations in Chrome that we can use as guidance? If we don't have any precedent to follow, then 10s seems fine to me.
LGTM. Thanks Ganggui! 
Ganggui, let's move ahead with the dialogue in #8. If there's precedent for timeout values we can use from somewhere else, let's try to re-use those. Otherwise, 10s seems fine.

We also should really add a spinner to indicate that something is loading. Otherwise, the user will be sitting on this screen for 10s waiting for the request to complete, but might not realize that something is actually happening. Alan, keeping this assigned to you for now. Can you recommend some type of spinner UI? Should we just put a spinner in the center of the screen? Note that the dialogue obviously won't be visible yet, it'll just be the regular sign in screen with the "CONTINUE" button grayed out.
Just find a bug, https://bugs.chromium.org/p/chromium/issues/detail?id=652858, and it looks will have better eng solution with 'spinner screen' together. So I will wait for UX input of spinner screen.

Note that we show 'import sync data' and 'managed account sign in confirmation' dialogue when switching sync account in 'sync customization preference screen'. The 'spinner screen' have to be displayed there as well.
Screens order:
'sign in' full screen -> optional 'switch from managed account' dialog or 'import sync data' dialog -> new 'spinner screen' -> optional 'confirm managed account sign in' dialog
Thanks Ganggui. I chatted with Alan about this today, he's going to take a look.

Alan, Ganggui's point in #12 is a good one. This spinner may appear on top of the sign in screen, but it also may appear on top of the sync settings screen (if a user is switching sync accounts to a managed account). That's the screen behind the dialogue in this screenshot: https://drive.google.com/a/google.com/file/d/0Byv8caX1Ib9dcGt3cF9lYy1Ta1E/view?usp=sharing
Labels: Hotlist-Polish

Comment 16 by ew...@chromium.org, Oct 14 2016

Labels: -Pri-2 identity-ux-backlog Pri-1
Alan, friendly ping. Can you take a look at this spinner UX when you get a chance?
Owner: ew...@chromium.org
Adding mocks and specs for the sign-in and sync settings loading states. 
sign_in.png
31.5 KB View Download
sync_settings.png
76.7 KB View Download

Comment 19 by ew...@chromium.org, Nov 12 2016

Labels: -identity-ux-backlog
Owner: gogerald@chromium.org
Woot, thanks Alan! Ganggui, do these mocks make sense? The error dialogue should appear after the timeout on top of the spinner.
Looks good to me, so we do not have cancel button, clicking on back button cancels the operation.

Note that there might be a dialogue after (like timeout dialogue) and before (like 'import sync data') this full screen spinner.

Comment 21 by ew...@chromium.org, Nov 15 2016

Labels: -Pri-1 Pri-2
Correct, clicking on system back (or the back button in the upper-left on the settings screen) should cancel the operation.

In the case of regular sign-in, clicking system back should bring the user back to the sign-in screen. In the case of settings/switch sync account, clicking system back should just remove the spinner and bring the user back to the sync settings screen; clicking the back in the upper left hand corner should bring the user back to the account settings screen.

Makes sense that there may be dialogues both before and after these spinner screens - I think that's alright.

When you have time to implement this, could you take a video of both flows (sign-in and settings), so we can get a sense for what it looks like?

Thanks Ganggui!
Owner: bzanotti@chromium.org
Re-assign to bzanotti@. He may have better solution with considering of the upcoming changes. Here is my previous attempt CL https://codereview.chromium.org/2385273003/.
Ganggui: Thanks for the link. What do you mean by upcoming changes? Am I missing something?

Also, FWIW, 10 seconds is the timeout we are already using on iOS (with a cancel button to replace the system back).

Comment 24 by ew...@chromium.org, Dec 22 2016

The changes Ganggui is referring to are other points in the FRE where we may be spinning/timing out (e.g. fetching Finch seed on the welcome screen before the sign in screen appears). I chatted with him about it offline, I can catch you up the next time we meet in person. For now, I don't think we need to worry about it, I think we should treat all these changes independently.
Project Member

Comment 25 by sheriffbot@chromium.org, Jan 23 2017

Status: Available (was: Assigned)
--Chrome Identity automated triaging--

This bug is Assigned and has gone one month without any activity, so it is being moved to Available to indicate that it is not actively being worked on. If you are working on this bug, please mark yourself as the owner and move back to Assigned. Please see https://goo.gl/78kbny for more details. Please remove the Services>SignIn or UI>Browser>Profiles components if this bug isn't related to Chrome Identity.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 26 by ew...@chromium.org, Jan 23 2017

Cc: jlebel@chromium.org msarda@chromium.org
Labels: -M-55 -signin-active-bug
This is still a valid bug that we should fix. Removing the milestone label since it's not associated with a particular milestone.

cc'ing the rest of the signin team.
Owner: bsazonov@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 29 by sheriffbot@chromium.org, Mar 17 2017

Status: Available (was: Assigned)
--Chrome Identity automated triaging--

This bug is Assigned and has gone one month without any activity, so it is being moved to Available to indicate that it is not actively being worked on. If you are working on this bug, please mark yourself as the owner and move back to Assigned. Please see https://goo.gl/78kbny for more details. Please remove the Services>SignIn or UI>Browser>Profiles components if this bug isn't related to Chrome Identity.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Assigned (was: Available)
Owner: bettes@chromium.org
Alan, I have a couple of questions. Spinner is called ProgressBar in Android terminology, so I'm going to use ProgressBar term to be consistent with the code.

1. On xxhdpi screens (like Nexus 5), 24dp ProgressBar looks really small (see attached screenshot). Moreover, updating_gms_progress_view dialog uses 32dp ProgressBar. updating_gms_progress_view dialog can be show right before account selection, so it probably makes sense to be consistent with it.

2. Is it critical to have opaque dialog in FRE and transparent in Sync Settings? We don't have any special handling of access point in that part of code so far. I'm not sure that additional complexity is good in this case.
DeviceScreenshot_2017-03-22_15:17:23.png
92.0 KB View Download

Comment 32 by ew...@chromium.org, Mar 22 2017

FWIW, I don't feel strongly that we need to make the FRE one opaque. I'm fine with them both being transparent.
Cc: bsazonov@chromium.org
Alan, while testing this feature I've come with another question.

Following one of the comments on code review, I've decided to restart network request every time user presses [RETRY], because if there was something wrong with network, it may take a long time for network stack to retry connection.
The problem with this approach is that time to get that account management policy on poor 2G network is more than 10 seconds. In my experience, it's usually 15-20 seconds on GIN-2g-poor.

You can see the effect on the following video: https://drive.google.com/open?id=0B5n1MGXpFFZcNWNiQk1MX3R4R3c

The only way to successfully get account management policy on such a network is to ignore the dialog and keep waiting (you can see it in the end of the video).

To gracefully handle such networks, it would probably make sense to increase timeout to something around 30 seconds and add a cancel button to progress dialog. Something like that: https://drive.google.com/open?id=0B5n1MGXpFFZcWVZubjBOcGtIZkE 

What do you think?

Comment 35 by ew...@chromium.org, Mar 23 2017

+1 to the idea of increasing the timeout and adding a "Cancel" button. Alan - could you help us clean up the spec for what that spinner dialogue (with a "Cancel" button) should look like? Note that it'll need to work on top of both the sign-in screen (during the sign-in case) and the sync settings screen (during the switch sync account case).

Comment 36 by ew...@chromium.org, Mar 23 2017

Labels: identity-ux-backlog
Owner: bsazonov@chromium.org
Status: Started (was: Assigned)
I had a chat with Alan. He is fine with my proposal in comment 34 as long as I change ProgressBar color to Google Blue 500.

Eli, what wording should we use for this? What do you think of "Getting account management policy..."?

I've uploaded CL that should fix this bug: https://codereview.chromium.org/2772203004. Feel free to chime in or add yourself to reviewers.

Known issues: the accentColor style parameter that Chrome uses to modify ProgressBar style works on Android L+ only. It also affects ProgressBar shown after tapping "ACCEPT & CONTINUE" on the very first screen, so current implementation is a bit more consistent. I've added some screenshots to illustrate it.
FirstPageProgressBar-Android_K.png
68.1 KB View Download
SigninProgressBar-Android_K.png
91.9 KB View Download
FirstPageProgressBar-Android_L+.png
69.4 KB View Download
SigninProgressBar-Android_L+.png
98.7 KB View Download

Comment 38 by ew...@chromium.org, Mar 27 2017

Cc: srahim@chromium.org
Owner: srahim@chromium.org
+Shimi for quick strings help

For background - we need to show a loading dialogue (see comment above) when users are trying to sign into a managed account on a poor wifi connection. They should be able to cancel, since it can take a while, so that they can continue without signing in. If the request times out (after 30 seconds), we will show an error dialogue (see comment#8) alerting the user that it's failed and offering the ability to "Retry."

Can you help us with the strings for both of these dialogues? Let us know if anything is unclear.
For loading:

"Contacting Google...this may take a minute" < We've used this language in other places in Google products to set expectations.

For the error, only a minor change for "Unable":
Can't sign in
Google took too long to respond

I also considered "Signing in...this may take a minute" but the "Contacting Google" language would work nicely with "Google took too long" in the case of a timeout error. In either case, we don't need to expose exactly what we're doing to the user. We can be more general.


Owner: ew...@chromium.org

Comment 41 by ew...@chromium.org, Mar 28 2017

Owner: bsazonov@chromium.org
Over to Boris to update the strings. Thanks Shimi!

Comment 42 Deleted

Thanks, Shimi! I've attached screenshots with final dialogs.

I have to admit that lack of whitespaces in "Google…this" looks a bit weird for me. Is it just my perception?
DeviceScreenshot_2017-03-29_14:23:39.png
100 KB View Download
DeviceScreenshot_2017-03-29_14:48:54.png
87.5 KB View Download
Project Member

Comment 44 by bugdroid1@chromium.org, Mar 29 2017

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

commit 33295fdb5fa26e409b197b81b2069c435184d6e3
Author: bsazonov <bsazonov@chromium.org>
Date: Wed Mar 29 18:49:00 2017

Add progress and timeout dialogs for getting account management policy

This CL adds two dialogs that are shown by ConfirmSyncDataStateMachine.
Dialogs implementation is in ConfirmSyncDataStateMachineDelegate.
The first dialog is a progress dialog that is shown while Chrome requests
server for account management policy.
The second dialog is a timeout dialog that is shown if Chrome doesn't receive
account management policy within 30 seconds.

BUG= 650121 

Review-Url: https://codereview.chromium.org/2772203004
Cr-Commit-Position: refs/heads/master@{#460471}

[add] https://crrev.com/33295fdb5fa26e409b197b81b2069c435184d6e3/chrome/android/java/res/layout/signin_progress_bar_dialog.xml
[modify] https://crrev.com/33295fdb5fa26e409b197b81b2069c435184d6e3/chrome/android/java/src/org/chromium/chrome/browser/signin/ConfirmSyncDataStateMachine.java
[add] https://crrev.com/33295fdb5fa26e409b197b81b2069c435184d6e3/chrome/android/java/src/org/chromium/chrome/browser/signin/ConfirmSyncDataStateMachineDelegate.java
[modify] https://crrev.com/33295fdb5fa26e409b197b81b2069c435184d6e3/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java
[modify] https://crrev.com/33295fdb5fa26e409b197b81b2069c435184d6e3/chrome/android/java/strings/android_chrome_strings.grd
[modify] https://crrev.com/33295fdb5fa26e409b197b81b2069c435184d6e3/chrome/android/java_sources.gni

Comment 45 by ew...@chromium.org, Mar 29 2017

Owner: bettes@chromium.org
The first loading dialogue looks a little off to me as well. Why is there so much whitespace between the "Cancel" button and the bottom of the line of text?

Also, is the text between the two dialogues different? It looks darker/more bold in the second dialogue to me.

Alan - could you please comment from a UX perspective?
Eli, thanks for bringing this up. You're right - I've added too much padding to the bottom of progress dialog content. I've found a dedicated style with appropriate paddings for such a case: AlertDialogContent. CL to use this style for timeout dialog: https://codereview.chromium.org/2786943002.

I've attached screenshots of Layout Inspector for old and new layouts. I've also attached screenshot with final view of the dialog. Alan, could you please validate these?

Considering text color - it looks like it is a problem in our style for AlertDialog. I've found two different colors:
1. #333333: all texts in progress dialog, timeout dialog title text, timeout dialog buttons text.
2. #000000: message text in timeout dialog. Not sure where it comes from, though.
I use regular AlertDialog.Builder to create timeout dialog, so I would expect this issue to be widespread. It probably makes sense to add another bug for it.
650121_OldLayout.png
10.3 KB View Download
650121_NewLayout.png
19.4 KB View Download
DeviceScreenshot_2017-03-30_11:22:15.png
98.7 KB View Download

Comment 47 by ew...@chromium.org, Mar 30 2017

Status: Assigned (was: Started)
The screenshot of the progress dialogue in #46 along with the screenshot of the timeout dialogue in #43 LGTM. Alan - please confirm those both look good to you as well.
Project Member

Comment 48 by bugdroid1@chromium.org, Mar 31 2017

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

commit c1eda31a97825bb7504ca74b5b14a6cfc73de03d
Author: bsazonov <bsazonov@chromium.org>
Date: Fri Mar 31 13:55:22 2017

Fix progress and timeout dialog for getting account management policy

This CL fixes two issues introduced by https://crrev.com/2772203004
1. Bottom padding of dialog content for progress dialog.
   This CL replaces manual padding control with AlertDialogContent style.
2. Retry button behavior in timeout dialog: it wasn't showing progress dialog
   again because of a bug introduced during review.

BUG= 650121 

Review-Url: https://codereview.chromium.org/2786943002
Cr-Commit-Position: refs/heads/master@{#461108}

[modify] https://crrev.com/c1eda31a97825bb7504ca74b5b14a6cfc73de03d/chrome/android/java/res/layout/signin_progress_bar_dialog.xml
[modify] https://crrev.com/c1eda31a97825bb7504ca74b5b14a6cfc73de03d/chrome/android/java/src/org/chromium/chrome/browser/signin/ConfirmSyncDataStateMachine.java

Owner: ew...@chromium.org
>> The screenshot of the progress dialogue in #46 along with the screenshot of the timeout dialogue in #43 LGTM. Alan - please confirm those both look good to you as well.

All button-text (retry AND cancel) on dialogs should use #4285F4 (Google Blue 500). 

https://material.googleplex.com/components/dialogs.html#dialogs-full-screen-dialogs
Owner: bzanotti@chromium.org
Other than the button-text coloring, everything LGTM. 
Owner: bsazonov@chromium.org
Boris - once you've updated the button coloring, could you post one final set of screenshots (or a video) of the entire flow? I'd like to get a sense for how jarring the difference in styling is between the two dialogues.
Eventually, I've found a way to fix timeout message text color as well.
CL is here: https://codereview.chromium.org/2801213003/.

Attached screenshots of final dialogs.

Eli, what do you think?
Progress_Nexus5_4.4.png
104 KB View Download
Timeout_Nexus5_4.4.png
103 KB View Download
Progress_Nexus5X_7.1.2.png
88.6 KB View Download
Timeout_Nexus5X_7.1.2.png
90.6 KB View Download
Project Member

Comment 54 by bugdroid1@chromium.org, Apr 7 2017

Looks great to me! Thanks much for resolving this Boris, great job.

Can we mark this as Fixed, or are there any other pending changes you have for this?
Status: Fixed (was: Assigned)
Thanks, Eli.

Last obvious improvement for this flow would be to leave "CONTINUE" button enabled while showing dialogs on top of it. Currently it toggles between enabled blue state and disabled gray one and it looks a bit strange. However, it is not possible to fix it before I address https://crbug.com/707786. I'll mark this as Fixed and add an appropriate note to https://crbug.com/707786.

BTW, I've checked these dialogs on Chrome Canary 59.0.3067.0 - everything looks good.

Comment 57 by ew...@chromium.org, Apr 10 2017

Awesome, thanks Boris, great work!

Sign in to add a comment