connectivity issue during sync sign-in leads to confusing UI state, possible UI hang?

RESOLVED FIXED

Status

()

Firefox for iOS
Firefox Accounts
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Gavin, Assigned: nalexander)

Tracking

unspecified
Other
iOS

Firefox Tracking Flags

(fxios+)

Details

Attachments

(2 attachments)

Created attachment 8614236 [details]
post sign-in screenshot

I just tried signing in to TestFlight build 19 for the first time. I think what happened is:

1) Entered my username/password (took a while since I had to go look up my password in 1password)
2) The Mountain View wireless is kind of spotty, and as I submitted the sign-in form my internet connection dropped (I was flipping between wifi and LTE)

After this, I got a preferences UI that said "Enter your password to connect" (see screenshot), which was confusing (since I had just done that). I tried tapping that row to see what that was about, but that apparently did nothing. I was only able to dismiss the settings window by hitting the "Done" button, after which I ended up on the tabs screen, and the whole app froze up (no buttons were responsive at all). I assume this could have been caused by the syncing?

It eventually recovered and my sync data appeared without any additional action, and going back to the settings pane showed the normal UI.

Updated

3 years ago
tracking-fennec: --- → ?
tracking-fxios: --- → ?
Duplicate of this bug: 1170744
tracking-fennec: ? → +
tracking-fxios: ? → +
Duplicate of this bug: 1171985
It's probably obvious, but we need to investigate whether this issue is being caused by anything in our Web content for FxA.
Still visible on Build #24. This is terrible UX.
tracking-fennec: + → ---
(Assignee)

Comment 5

3 years ago
(In reply to Aaron Train [:aaronmt] from comment #4)
> Still visible on Build #24. This is terrible UX.

I will try to get to this before I go on PTO this Friday but I'm "a little busy".
Any update here?
Assignee: nobody → nalexander
Component: Sync → Firefox Accounts
Status: NEW → ASSIGNED
I don't think this has anything to do with connectivity issues. It always happens, on both device and in simulator. Looks more like a state / ui out-of-sync issue.
(Assignee)

Comment 8

3 years ago
(In reply to Stefan Arentz [:st3fan] from comment #7)
> I don't think this has anything to do with connectivity issues. It always
> happens, on both device and in simulator. Looks more like a state / ui
> out-of-sync issue.

Stefan is correct.  I dug into this and have a patch in the works.

What is happening is that we've grown consumers of FirefoxAccount.advance(), and they're now racing at setup time.  Different parts of the UI start advancing the account.  One of the setup tokens from the fxa-content-server is single use; all advancers that try to reuse it fail.  By the time the successful advancer finishes, parts of the UI have already seen an error (even though the final advance is successful).

rnewman and I discussed how to lock this efficiently; patch inbound.
(Assignee)

Comment 9

3 years ago
Created attachment 8643203 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/861
Attachment #8643203 - Flags: review?(sarentz)
Attachment #8643203 - Flags: review?(rnewman)
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1181583
(Assignee)

Comment 11

3 years ago
Comment on attachment 8643203 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/861

st3fan is under water post-PTO, so redirecting to etoop, who has worked in this area.
Attachment #8643203 - Flags: review?(sarentz) → review?(etoop)
Attachment #8643203 - Flags: review?(etoop) → review+
(Assignee)

Updated

3 years ago
Attachment #8643203 - Flags: review?(rnewman)
(Assignee)

Comment 12

3 years ago
Landed with r=etoop,st3fan f=rnewman.

https://github.com/mozilla/firefox-ios/commit/adb0927ed01ed13bad09cae3284eb631d33af281

AaronMT: this could use verification.  It should be as simple as not observing a "PW required" orange error when signing in to an existing Firefox Account.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Flags: needinfo?(aaron.train)
Resolution: --- → FIXED
(Assignee)

Comment 13

3 years ago
AaronMT: further, any janky syncing or hanging pull-to-refresh, etc, that you observe should start by pointing the finger at this ticket.
(In reply to Nick Alexander :nalexander from comment #12)
> Landed with r=etoop,st3fan f=rnewman.
> 
> https://github.com/mozilla/firefox-ios/commit/
> adb0927ed01ed13bad09cae3284eb631d33af281
> 
> AaronMT: this could use verification.  It should be as simple as not
> observing a "PW required" orange error when signing in to an existing
> Firefox Account.

Aye, looks good

(In reply to Nick Alexander :nalexander from comment #13)
> AaronMT: further, any janky syncing or hanging pull-to-refresh, etc, that
> you observe should start by pointing the finger at this ticket.

There's https://bugzilla.mozilla.org/show_bug.cgi?id=1191925
Flags: needinfo?(aaron.train)
You need to log in before you can comment on or make changes to this bug.