Closed Bug 964046 Opened 10 years ago Closed 10 years ago

crash in java.lang.NullPointerException: at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.toJSONObject(AndroidFxAccount.java)

Categories

(Firefox for Android Graveyard :: General, defect)

29 Branch
All
Android
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ioana.chiorean, Unassigned)

Details

(Keywords: crash)

Crash Data

This bug was filed from the Socorro interface and is 
report bp-87bdae66-4029-4e3b-a65b-adb6e2140126.

1. Update app
2. Open itDo some browsing (I tries to open marketplace at first, second try to open a crah report)
3. Clear data from Android settings 

I crashes non-stop. You can not use the app.
Step 3 will not fix things - app still crashing but you cam browse like 2 min. 

Install clean app (latest from ftp) will work fine

=============================================================
0 	libmozalloc.so 	mozalloc_abort(char const*) 	/builds/slave/m-cen-and-00000000000000000000/build/obj-firefox/memory/mozalloc/../../../memory/mozalloc/mozalloc_abort.cpp
1 	libxul.so 	Java_org_mozilla_gecko_GeckoAppShell_reportJavaCrash 	/builds/slave/m-cen-and-00000000000000000000/build/obj-firefox/widget/android/../../../widget/android/AndroidJNI.cpp
2 	libmozglue.so 	Java_org_mozilla_gecko_GeckoAppShell_reportJavaCrash 	mozglue/android/jni-stubs.inc
3 	libdvm.so 	libdvm.so@0x1dc4e 	
4 	data@app@org.mozilla.fennec-2.apk@classes.dex 	data@app@org.mozilla.fennec-2.apk@classes.dex@0x1d0de0 	
5 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x9253a6 	
6 	libdvm.so 	libdvm.so@0x4ded1 	
7 	data@app@org.mozilla.fennec-2.apk@classes.dex 	data@app@org.mozilla.fennec-2.apk@classes.dex@0x1d0dde 	
8 	libmozglue.so 	Java_org_mozilla_gecko_GeckoAppShell_dispatchMemoryPressure 	mozglue/android/jni-stubs.inc
9 		@0x5fa0314a 	
10 	libmozglue.so 	Java_org_mozilla_gecko_GeckoAppShell_dispatchMemoryPressure 	mozglue/android/jni-stubs.inc
11 		@0x40198ffe 	
12 	libc.so 	libc.so@0xd9bf 	
13 	libdvm.so 	libdvm.so@0x4fb01 	
14 	libdvm.so 	libdvm.so@0x691e7 	
15 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x1a94be 	
16 	libdvm.so 	libdvm.so@0x6920b 	
17 	core.odex 	core.odex@0x1e89ba 	
18 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0x312292 	
19 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x9253a6 	
20 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0x31227e 	
21 	data@app@org.mozilla.fennec-2.apk@classes.dex 	data@app@org.mozilla.fennec-2.apk@classes.dex@0x1f9382 	
22 	libdvm.so 	libdvm.so@0x6b429 	
23 	data@app@org.mozilla.fennec-2.apk@classes.dex 	data@app@org.mozilla.fennec-2.apk@classes.dex@0x1f9382 	
24 	data@app@org.mozilla.fennec-2.apk@classes.dex 	data@app@org.mozilla.fennec-2.apk@classes.dex@0x4538a 	
25 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x9253a6 	
26 	data@app@org.mozilla.fennec-2.apk@classes.dex 	data@app@org.mozilla.fennec-2.apk@classes.dex@0x1f9382 	
27 		@0x5b42cffe 	
28 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x4c1acc4 	
29 	libdvm.so 	libdvm.so@0x4fa07 	
30 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x4c1acc4 	
31 	libdvm.so 	libdvm.so@0xa9c86 	
32 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0x31227e 	
33 	libdvm.so 	libdvm.so@0x4dd3f 	
34 	libdvm.so 	libdvm.so@0xae19e 	
35 	libdvm.so 	libdvm.so@0xa9c86 	
36 	libdvm.so 	libdvm.so@0x4f8bd 	
37 	data@app@org.mozilla.fennec-2.apk@classes.dex 	data@app@org.mozilla.fennec-2.apk@classes.dex@0xc7ff8 	
38 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x9253a6 	
39 	libdvm.so 	libdvm.so@0x1ddbe 	
40 	libdvm.so 	libdvm.so@0x27062 	
41 	libdvm.so 	libdvm.so@0x2df06 	
42 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0x69ce 	
43 	libdvm.so 	libdvm.so@0x2b5ee 	
44 	framework.odex 	framework.odex@0x228e72 	
45 	core.odex 	core.odex@0x230055 	
46 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0x69ce 	
47 	libdvm.so 	libdvm.so@0x5ff23 	
48 	dalvik-LinearAlloc (deleted) 	dalvik-LinearAlloc (deleted)@0x69ce 	
49 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x136fe 	
50 	libdvm.so 	libdvm.so@0xae19e 	
51 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x136fe 	
52 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x136fe 	
53 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xabfa0e 	
54 	libdvm.so 	libdvm.so@0x8de1c 	
55 	libdvm.so 	libdvm.so@0x5ff4d 	
56 	libdvm.so 	libdvm.so@0x94c92 	
57 	libdvm.so 	libdvm.so@0x5419d 	
58 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xcc0796 	
59 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xabfa0e 	
60 	libdvm.so 	libdvm.so@0xae19e 	
61 	libdvm.so 	libdvm.so@0x5ff4d 	
62 	libdvm.so 	libdvm.so@0xae19e 	
63 	libdvm.so 	libdvm.so@0xae4aa 	
64 	libdvm.so 	libdvm.so@0xae4a6 	
65 	libdvm.so 	libdvm.so@0x54cd1 	
66 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0xcc0796 	
67 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x4c1acc4 	
68 	libdvm.so 	libdvm.so@0x54c2b 	
69 	libc.so 	libc.so@0xca5a 	
70 	libc.so 	libc.so@0xcbd6 	
71 	dalvik-heap (deleted) 	dalvik-heap (deleted)@0x4c1acc4
Device: Galaxy Nexus Android 4.3 (can't test other devices yet as I do not have any other at home)
java.lang.NullPointerException
	at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.toJSONObject(AndroidFxAccount.java:253)
	at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.dump(AndroidFxAccount.java:370)
	at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter.onPerformSync(FxAccountSyncAdapter.java:232)
	at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
Are you testing services-central builds? (If not, please do.)
Flags: needinfo?(ioana.chiorean)
The most likely cause for this is that you upgraded across a major version change, and thus the Android account on your device is no longer valid.

The debugging code isn't tolerant of errors (because it'll be turned off in release), and we deliberately added no upgrade path for internal data (because that's just wasting time at this stage).

Please see if you can reproduce after deleting your account (Android Settings > Accounts & sync > Firefox Account > Menu: Remove Account) and re-adding it. If not, great.

Thanks!
There's about 75 crashes on crash-stats with this signature so I'd be curious if you can still reproduce with the above comment.
It'll crash every single time it tries to sync, so volume is likely to be high.
(In reply to Richard Newman [:rnewman] from comment #6)
> It'll crash every single time it tries to sync, so volume is likely to be
> high.

It crashes with the old builds and old credentials. 

Having a clean old version of fennec app - sync new account - update won't crash. (both on nightly and services build)
Flags: needinfo?(ioana.chiorean)
Great, thanks for checking!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Incidentally, here's a full trace for this error.

01-21 22:07:13.105 I/FxAccounts( 6244): fennec_rnewman :: FxAccountAgeLockoutHelper :: $$FxA PII$$: Passed age check: year text was found in item list but was not a number.
01-21 22:07:13.105 I/FxAccounts( 6244): fennec_rnewman :: FxAccountCreateAccountActivity :: $$FxA PII$$: Passed age check.
01-21 22:07:16.799 I/FxAccounts( 6244): fennec_rnewman :: FxAccountSetupTask :: Got success.
01-21 22:07:16.809 I/FxAccounts( 6244): fennec_rnewman :: FxAccountCreateAccountActivity :: Got success creating account.
01-21 22:07:17.820 W/Bundle  (  663): Key version expected String but value was a java.lang.Integer.  The default value <null> was returned.
01-21 22:07:17.820 W/Bundle  (  663): Attempt to cast generated internal exception:
01-21 22:07:17.820 W/Bundle  (  663): java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
01-21 22:07:17.820 W/Bundle  (  663): 	at android.os.Bundle.getString(Bundle.java:1103)
01-21 22:07:17.820 W/Bundle  (  663): 	at com.android.server.accounts.AccountManagerService.addAccountInternal(AccountManagerService.java:721)
01-21 22:07:17.820 W/Bundle  (  663): 	at com.android.server.accounts.AccountManagerService.addAccountExplicitly(AccountManagerService.java:589)
01-21 22:07:17.820 W/Bundle  (  663): 	at android.accounts.IAccountManager$Stub.onTransact(IAccountManager.java:185)
01-21 22:07:17.820 W/Bundle  (  663): 	at com.android.server.accounts.AccountManagerService.onTransact(AccountManagerService.java:278)
01-21 22:07:17.820 W/Bundle  (  663): 	at android.os.Binder.execTransact(Binder.java:412)
01-21 22:07:17.820 W/Bundle  (  663): 	at dalvik.system.NativeStart.run(Native Method)
01-21 22:07:17.860 I/AccountManagerService(  663): the accounts changed, sending broadcast of android.accounts.LOGIN_ACCOUNTS_CHANGED
01-21 22:07:18.160 E/GeckoAppShell( 6244): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main")
01-21 22:07:18.160 E/GeckoAppShell( 6244): java.lang.NullPointerException
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.toJSONObject(AndroidFxAccount.java:384)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.dump(AndroidFxAccount.java:481)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at org.mozilla.gecko.fxa.activities.FxAccountCreateAccountActivity$CreateAccountDelegate.handleSuccess(FxAccountCreateAccountActivity.java:135)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at org.mozilla.gecko.fxa.activities.FxAccountSetupTask.onPostExecute(FxAccountSetupTask.java:84)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at org.mozilla.gecko.fxa.activities.FxAccountSetupTask$FxAccountCreateAccountTask.onPostExecute(FxAccountSetupTask.java:127)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at android.os.AsyncTask.finish(AsyncTask.java:632)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at android.os.AsyncTask.access$600(AsyncTask.java:177)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at android.os.Handler.dispatchMessage(Handler.java:102)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at android.os.Looper.loop(Looper.java:158)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at android.app.ActivityThread.main(ActivityThread.java:5851)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at java.lang.reflect.Method.invokeNative(Native Method)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at java.lang.reflect.Method.invoke(Method.java:515)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1067)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:883)
01-21 22:07:18.160 E/GeckoAppShell( 6244): 	at dalvik.system.NativeStart.main(Native Method)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.