Closed Bug 1887071 Opened 2 years ago Closed 2 years ago

"Working" error received for reconnecting after the FxA password was changed on a different device

Categories

(Firefox for Android :: Accounts and Sync, defect, P1)

Firefox 125
All
Android
defect

Tracking

()

VERIFIED FIXED
126 Branch
Tracking Status
firefox124 --- unaffected
firefox125 --- verified
firefox126 --- verified

People

(Reporter: vtamas, Assigned: bdk)

References

Details

(Keywords: regression, Whiteboard: [ux-fun-2024] [fxdroid])

Attachments

(2 files)

Attached image 1711013394665.JPEG

Prerequisites

The user is logged in with the same account, both on a device and Desktop.

Steps to reproduce

  1. Change the password on the desktop side.
  2. On Android, go to Settings - account on your device and force sync.
  3. Tap on the “Reconnect to resume syncing” warning.
  4. Tap on "Sign in to reconnect".
  5. Complete the field with the new password.

Expected behavior

The user is able to sign in.

Actual behavior

“Working“ error is displayed and the login process is not finished.

Device information

  • Firefox version: Firefox 125 (2024-03-20), Firefox 124 beta 3
  • Android device model: Realme C35 (Android 12), Samsung A32 (Android 13)

Any additional information?

This issue is a regression: Last Good build [2024-03-13] - First Bad build [2024-03-14]

See Also: → 1887630

I'm pretty confident this was caused by https://github.com/mozilla/application-services/pull/6111/files#diff-4759fc0e437459837842e6e1e2eb8c2e4559eb8ff3f94792edf627b34fea98fe (merged on 3-12).

That code added a method for Firefox Android and other FxA consumers to pass its session token directly to the fxa client. This is an improvement over the current flow where the fxa client request a session token which results in 2 session tokens for the same login and confusing corner cases. Note: this code hasn't been hooked up on the Android side yet.

There's a subtle problem with that code however which happens when a user is in the auth problems state:

  • First of all, the client does not know it's in the auth problems state. That currently happens at the android-components layer. See https://bugzilla.mozilla.org/show_bug.cgi?id=1867793 for plans to change this.
  • However the client does have a session token --the old session token that was invalidated by the password change.
  • When the client performs the reauthentication, if there's a stored session token then it assumes that that old session token was passed in by firefox-android as part of the new API, which causes authentication problems.

I think there should be a fairly simple fix that we can uplift for 125 if needed. Does this affect 124? It seems like it shouldn't based on the release date calendar.

Assignee: nobody → bdeankawamura

Comment on attachment 9393571 [details] [review]
(v125) GitHub Pull Request

Beta/Release Uplift Approval Request

  • User impact if declined: A relatively small number of users will be stuck in the "authentication problems" state for FxA. They will need to log out, then log back in in order to access their account.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Very few lines of code are changing.
  • String changes made/needed: None.
  • Is Android affected?: Yes
Attachment #9393571 - Flags: approval-mozilla-beta?
Priority: -- → P1

Can you confirm that things are working better with current Nightly builds?
EDIT: Actually, this change hasn't managed to get into a shipping Fenix nightly yet :(. You'll need to test with one that has A-S 126.20240327050322 or newer showing on the About screen. That bump is currently on autoland and will hopefully merge to central in time for the next round of builds.

I just tested this by building Fenix after manually bumping A-S to 126.20240327050322. Everything worked fine after re-authenticating with my new password.

I verified the fix on a locally built Fenix after applying bug 1888422.

Comment on attachment 9393571 [details] [review]
(v125) GitHub Pull Request

Approved for AS 125.0.1 & Fenix 125.0b6.

Attachment #9393571 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+

Verified as fixed on Nightly 126.0a1 from 03/29 with Samsung Galaxy S22 Ultra (Android 14) and OPPO A15s (Android 10).

Flags: qe-verify+

Verified as fixed on the latest Beta 125.0b6.

Devices used:

  • Samsung Galaxy S23 Ultra (Android 14).
  • Lenovo Tab P11 Pro (Android 13).
  • OPPO A15s (Android 10).
  • OnePlus A3000 (Android 6).

Marking the ticket as verified.

Status: RESOLVED → VERIFIED
Whiteboard: [ux-fundamental]
Whiteboard: [ux-fundamental] → [ux-fundamentals]
Whiteboard: [ux-fundamentals] → [ux-fun-2024] [fxdroid]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: