crash in java.lang.IllegalArgumentException: account is null at android.accounts.AccountManager.getUserData(

VERIFIED FIXED in Firefox 14



Firefox for Android
Android Sync
6 years ago
7 months ago


(Reporter: nhirata, Assigned: rnewman)




Firefox Tracking Flags

(firefox14 verified, firefox15 verified, blocking-fennec1.0 +)


(Whiteboard: [native-crash][qa+], crash signature)


(2 attachments)

This bug was filed from the Socorro interface and is 
report bp-10607757-e464-40ac-a5a6-e1a122120409 .
java.lang.IllegalArgumentException: account is null
	at android.accounts.AccountManager.getUserData(
	at org.mozilla.gecko.sync.syncadapter.SyncAdapter.getClientsCount(
	at org.mozilla.gecko.sync.syncadapter.SyncAdapter.getSyncInterval(
	at org.mozilla.gecko.sync.syncadapter.SyncAdapter.onPerformSync(
	at android.content.AbstractThreadedSyncAdapter$


6 years ago
Whiteboard: [native-crash]
I've seen this 5 times today

Comment 2

6 years ago
In fact, it was hit by only two users (two different OSes) from 14.0a1/20120408.

Comment 3

6 years ago
Stealing this. This isn't supposed to be possible.
Component: General → Android Sync
Product: Fennec Native → Mozilla Services
QA Contact: general → android-sync
Version: Firefox 14 → unspecified

Comment 5

6 years ago
The short-term issue here is that we're being handed a 'null' account (one that includes no fields, so we can't sync with it), but our backoff code isn't aware of this error case.

Should be a trivial fix.

The root cause is having more than one Fennec installed; I don't think Android deals well with authenticators that attach metadata to the account (in that I think it stores metadata per-authenticator, and we have multiple authenticators), and so we end up with a blank account object when we're asked to sync.

Suggesting softblocker to avoid crash reports.
blocking-fennec1.0: --- → ?

Comment 6

6 years ago
Not critical; not a common (or actually supported) scenario.
Severity: critical → normal
blocking-fennec1.0: ? → +


6 years ago
Assignee: nobody → rnewman
Whiteboard: [native-crash] → [native-crash][reviewed, being tested]

Comment 7

6 years ago

Thanks for testing, Chenxia.

This fix will correctly and quietly skip the sync if we get a blank Account object. It also disables syncing this product.

QA: to repro, you need two versions of Fennec installed. Verify that when the second syncs, it produces log output "No credentials attached to account. Aborting sync.", and that afterwards only one box is checked in the account settings app. The other version of Fennec should sync correctly.

Behavior with only one Fennec installed should be unchanged.
Whiteboard: [native-crash][reviewed, being tested] → [native-crash]
Target Milestone: --- → mozilla15

Comment 8

6 years ago
Created attachment 618437 [details] [diff] [review]

Low-risk fix for an edge case, avoids crash submissions.

Happy to let this bake on m-c for a couple days; just flagging so I don't forget about it!
Attachment #618437 - Flags: review+
Attachment #618437 - Flags: approval-mozilla-aurora?
Tested and works as expected.


- Install two versions of Android Firefox (e.g., Fennec-debug and Nightly)
- Set up sync through the Firefox version that is *not* being tested for the fix (if both versions have the fix, it doesn't matter)
- Go to Settings > Accounts > (Firefox Sync account)
- Under "Data & Synchronization," only the Firefox version that Sync was set up through will be checked.
- Check the box for the Firefox version that is being tested. Sync should be kicked off automatically; if not, force a sync.

No errors in the logs. In "Data & Synchronization" the newly checked Firefox version should be unchecked again.

Previous errors:
Fennec would "stop unexpectedly." Errors show up in the logs for "account is null".
Whiteboard: [native-crash] → [native-crash][landed on github]

Comment 10

6 years ago
Removing GitHub annotation: this is in mozilla-inbound, which is why there's a target milestone set.
Whiteboard: [native-crash][landed on github] → [native-crash]
Last Resolved: 6 years ago
Resolution: --- → FIXED
Attachment #618437 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+

Comment 12

6 years ago
status-firefox14: --- → fixed
Whiteboard: [native-crash] → [native-crash][qa+]
This crash doesn't occur anymore on the latest Aurora and Nightly builds. Closing bug as verified fixed on:

Firefox 15.0a1 (2012-05-29)
Firefox 14.0a2 (2012-05-29)

Device: Galaxy Nexus
OS: Android 4.0.2
status-firefox14: fixed → verified
status-firefox15: --- → verified
Component: Android Sync → Android Sync
Product: Mozilla Services → Android Background Services


7 months ago
Product: Android Background Services → Firefox for Android
You need to log in before you can comment on or make changes to this bug.