If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

java.lang.SecurityException: caller uid 10109 is different than the authenticator's uid

RESOLVED FIXED

Status

()

Firefox for Android
Android Sync
P1
normal
RESOLVED FIXED
6 years ago
4 days ago

People

(Reporter: rnewman, Assigned: rnewman)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

6 years ago
Got this completing J-PAKE setup on Galaxy S2, Android 2.3.4.

E/AndroidRuntime( 5446): FATAL EXCEPTION: Timer-0
E/AndroidRuntime( 5446): java.lang.SecurityException: caller uid 10109 is different than the authenticator's uid
E/AndroidRuntime( 5446): 	at android.os.Parcel.readException(Parcel.java:1322)
E/AndroidRuntime( 5446): 	at android.os.Parcel.readException(Parcel.java:1276)
E/AndroidRuntime( 5446): 	at android.accounts.IAccountManager$Stub$Proxy.addAccount(IAccountManager.java:547)
E/AndroidRuntime( 5446): 	at android.accounts.AccountManager.addAccountExplicitly(AccountManager.java:507)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.setup.activities.AccountActivity.createAccount(AccountActivity.java:233)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.setup.activities.SetupSyncActivity.onComplete(SetupSyncActivity.java:296)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.jpake.JPakeClient.complete(JPakeClient.java:655)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.jpake.JPakeClient.decryptData(JPakeClient.java:644)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.jpake.JPakeClient.onRequestSuccess(JPakeClient.java:810)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.jpake.JPakeClient$JpakeRequestResourceDelegate.handleHttpResponse(JPakeClient.java:917)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.net.BaseResource.execute(BaseResource.java:206)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.net.BaseResource.go(BaseResource.java:228)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.net.BaseResource.get(BaseResource.java:234)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.jpake.JPakeRequest.get(JPakeRequest.java:68)
E/AndroidRuntime( 5446): 	at org.mozilla.gecko.sync.jpake.JPakeClient$GetStepTimerTask.run(JPakeClient.java:1094)
E/AndroidRuntime( 5446): 	at java.util.Timer$TimerImpl.run(Timer.java:284)
W/ActivityManager( 2704):   Force finishing activity org.mozilla.fennec_rnewman/org.mozilla.gecko.sync.setup.activities.SetupSyncActivity
(Assignee)

Comment 1

6 years ago
http://loganandandy.tumblr.com/post/613041897/caller-uid-is-different
(Assignee)

Comment 2

6 years ago
Ahem.

  That usually means that you are passing in the wrong context when you’re
  calling AccountManager.get(this).addAccountExplicitly. You need to make sure
  that you’re using the same context every time you call AccountManaget.get().
  This is to prevent other things from messing with accounts your service has
  created.

http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1/

  src/main/java/org/mozilla/gecko/sync/setup/activities/AccountActivity.java
  86:    mAccountManager = AccountManager.get(getApplicationContext());

  src/main/java/org/mozilla/gecko/sync/setup/activities/SetupSyncActivity.java
  97:    mAccountManager = AccountManager.get(getApplicationContext());
  108:    AccountManager mAccountManager = AccountManager.get(this);
  243:      AccountManager mAccountManager = AccountManager.get(this);

  src/main/java/org/mozilla/gecko/sync/setup/SyncAuthenticatorService.java
  137:      final AccountManager am = AccountManager.get(mContext);

  src/main/java/org/mozilla/gecko/sync/syncadapter/SyncAdapter.java
  90:    mAccountManager = AccountManager.get(context);
(Assignee)

Comment 3

6 years ago
Fixed:

https://github.com/mozilla-services/android-sync/commit/cce053f0bccaffad5b90d5d2cf14cd04c9335e84

I corrected use of contexts, avoided some redundant mAccountManager shadowing, and changed the accountType string. This seems to make Android 2.3.4 happy.
Assignee: liuche → rnewman
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Component: Android Sync → Android Sync
Product: Mozilla Services → Android Background Services

Updated

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