-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Multiple FxAccountsManager instances #3058
Comments
The way we resolved this currently, is to re-create an instance of FxAccountsManager in |
(x-ref to PR related to quickly addressing the fresh state in the service mozilla-mobile/firefox-ios#6496) |
In the past we've talked about moving the storage for FxA state into rust code itself, so that instead of calling code having to persist a JSON string after modifying account state, we have the rust code make calls to a persistence layer as required. Would that help keep things straight here, if the two processes were operating on the same underlying state? |
I suspect it would help, but wouldn't solve the problem: each FxAccountManager holds a RustFxAccounts instance. So anything cached in memory would not be synchronized. There's also the bigger problem that FxAccountManager itself holds state (well, mostly the state machine state). |
Did some digging with @garvankeeley on a bug today and we figured out that we were playing with two FxAccountsManager instances with different states, because
NotificationService
(small binary spawned by incoming push notifications) andFennec
(the actual app) are two different executables with no shared memory.I see this as a big footgun for the future that's going to cause pretty bad bugs that are going to take a long time to debug.
┆Issue is synchronized with this Jira Task
┆Epic: FxA Ecosystem (backlog)
The text was updated successfully, but these errors were encountered: