Closed Bug 1407316 Opened 7 years ago Closed 3 years ago

Explicitly maintain an internal Account shared state

Categories

(Firefox for Android Graveyard :: Firefox Accounts, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: Grisha, Unassigned)

References

Details

Bug 1401318 clearly demonstrated that long-lived disparate representations of shared state will eventually become out-of-sync with the world (surprise!).

In our case, the 'shared state' is the 'account' instance in AndroidFxAccount. Its many consumers have different life-cycles, and maintain this state for varying periods of times. It's also inevitable that the underlying 'account' object will become out-of-sync with the world, at which point we might fail in a variety of ways. Symptoms usually include failing to access data associated with the 'account' object - either via userData accessors (as in Bug 1349147), or via the internal Accounts APIs (as in https://bugzilla.mozilla.org/show_bug.cgi?id=1401318#c17).

The many StrictMode warnings while accessing parts of the UI related to the accounts system are (likely) another manifestation of the current flow.

While Bug 1401318 fixes some of the more pressing symptoms, it's a good idea to follow-up with a root-cause fix as well.

One approach here might look like maintaining an 'account' representation in a shared singleton. This work involves modifications to AndroidFxAccount and other consumers (which should be mechanical and straight-forward) of the shared Account, and making sure we maintain our shared state up-to-date (which is likely to get tricky).
Blocks: 1391338
Priority: -- → P2
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.