Closed Bug 1440623 Opened 6 years ago Closed 6 years ago

Crash in java.lang.IllegalStateException: Unexpectedly missing any accounts of type org.mozilla.fennec_aurora_fxaccount at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.refreshAndroidAccount(AndroidFxAccount.java)

Categories

(Firefox for Android Graveyard :: Firefox Accounts, defect, P5)

Unspecified
Android
defect

Tracking

(firefox-esr52 unaffected, firefox58 unaffected, firefox59 unaffected, firefox60 wontfix, firefox61 wontfix, firefox62 wontfix, firefox63 fixed)

RESOLVED FIXED
Tracking Status
firefox-esr52 --- unaffected
firefox58 --- unaffected
firefox59 --- unaffected
firefox60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- fixed

People

(Reporter: calixte, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: crash, regression)

Crash Data

This bug was filed from the Socorro interface and is
report bp-429d120f-1875-4374-920c-fd6a00180223.
=============================================================

java.lang.IllegalStateException: Unexpectedly missing any accounts of type org.mozilla.fennec_aurora_fxaccount
	at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.refreshAndroidAccount(AndroidFxAccount.java:753)
	at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.getState(AndroidFxAccount.java:731)
	at org.mozilla.gecko.fxa.activities.FxAccountStatusFragment.refresh(FxAccountStatusFragment.java:518)
	at org.mozilla.gecko.fxa.activities.FxAccountStatusFragment$InnerSyncStatusDelegate$1.run(FxAccountStatusFragment.java:382)
	at android.app.Activity.runOnUiThread(Activity.java:5890)
	at org.mozilla.gecko.fxa.activities.FxAccountStatusFragment$InnerSyncStatusDelegate.onSyncStarted(FxAccountStatusFragment.java:402)
	at org.mozilla.gecko.fxa.sync.FxAccountSyncStatusHelper$1.run(FxAccountSyncStatusHelper.java:59)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6135)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)

=============================================================

There is 1 crash in nightly 60 with buildid 20180223001836. In analyzing the backtrace, the regression may have been introduced by patch [1] to fix bug 1429735.

[1] https://hg.mozilla.org/mozilla-central/rev?node=a5e1cc926177
Flags: needinfo?(gkruglov)
Crashes seem to come from a random assortment of devices (lenovo, samsung, etc), and from both Android 7 and Android 6.

Here's what appears to happen:
- user is in the Sync Settings UI (FxAccountStatusFragment is a registered sync status observer)
- sync is kicked off, either manually by the user - most likely, or by the system
- FxAccountStatusFragment's "refresh UI state" code runs
- As the first order of business, it asks the account manager to provide it with the current Account (working around cache divergence bugs, see Bug 1407316 and friends)
- Unexpectedly, system's Account API says that there is no Account present.

In other words, at one moment we had an Account, sync is kicked off for that account, and we're looking at the Sync Settings page and then suddenly the account disappeared from underneath us.

This is strange, and I'm not sure how yet how it might be caused by Bug 1429735. That bug doesn't remove anything from the Accounts API, and doesn't actually involve it. It simply changes the account state, and that state exists purely as some metadata associated with the account.

This sort of looks similar in appearance to Bug 1435809 - system Account API possibly misleading about presence of the account...

If the system API is actually correct and the account really did disappear underneath us while we were syncing, it would be very good to understand how that might happen.
Is this bad enough to consider backouts?
Not judging by the current volume of crashes.
Crash Signature: [@ java.lang.IllegalStateException: Unexpectedly missing any accounts of type org.mozilla.fennec_aurora_fxaccount at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.refreshAndroidAccount(AndroidFxAccount.java)] → [@ java.lang.IllegalStateException: Unexpectedly missing any accounts of type org.mozilla.fennec_aurora_fxaccount at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.refreshAndroidAccount(AndroidFxAccount.java)] [@ java.lang.IllegalStateException: Un…
Crash Signature: Unexpectedly missing any accounts of type org.mozilla.firefox_beta_fxaccount at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.refreshAndroidAccount(AndroidFxAccount.java) ] → Unexpectedly missing any accounts of type org.mozilla.firefox_beta_fxaccount at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.refreshAndroidAccount(AndroidFxAccount.java)] [@ java.lang.IllegalStateException: Unexpectedly missing any accounts of t…
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
This is still pretty low volume on beta, so it can probably remain a P5 for now.
All the signatures are for 62.0.3, we haven't had any crash since 63 shipped and I couldn't find any obvious morphed signature so let's mark it as fixed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.