Error java lang securityexception caller uid

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

java.lang.SecurityException: caller uid xxxxx is different than the authenticator’s uid when calling OwnCloudClientFactory.createOwnCloudClient #99

java.lang.SecurityException: caller uid xxxxx is different than the authenticator’s uid when calling OwnCloudClientFactory.createOwnCloudClient #99

Comments

My app displays a list of owncloud accounts retrieved with AccountManager.get(this).getAccountsByType(«owncloud»)

After the user selects an account I try to create an OwnCloudClient with OwnCloudClientFactory.createOwnCloudClient(selectedAccount, MainActivity.this); .

Читайте также:  Javascript очистка поля формы

But the application crashes with a runtime exception:

Caused by: java.lang.SecurityException: caller uid 10341 is different than the authenticator's uid at android.os.Parcel.readException(Parcel.java:1546) at android.os.Parcel.readException(Parcel.java:1499) at android.accounts.IAccountManager$Stub$Proxy.getUserData(IAccountManager.java:692) at android.accounts.AccountManager.getUserData(AccountManager.java:344) at com.owncloud.android.lib.common.accounts.AccountUtils.getBaseUrlForAccount(AccountUtils.java:141) at com.owncloud.android.lib.common.OwnCloudClientFactory.createOwnCloudClient(OwnCloudClientFactory.java:77) . 

The text was updated successfully, but these errors were encountered:

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

«FATAL EXCEPTION» caused by SecurityException: caller uid 10103 lacks any of android.permission.GET_ACCOUNTS #287

«FATAL EXCEPTION» caused by SecurityException: caller uid 10103 lacks any of android.permission.GET_ACCOUNTS #287

Comments

With TBA 1.4 installed from the Play store, every launch immediately exits.

11-20 14:50:22.980 752-2908/? E/qcom_sensors_hal﹕ hal_process_report_ind: Bad item quality: 11 11-20 14:50:23.640 752-29418/? W/AccountManagerService﹕ caller uid 10103 lacks any of android.permission.GET_ACCOUNTS 11-20 14:50:23.640 12623-12646/? W/dalvikvm﹕ threadid=10: thread exiting with uncaught exception (group=0x415b4ba8) 11-20 14:50:23.650 12623-12646/? E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1 Process: com.thebluealliance.androidclient, PID: 12623 java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841) Caused by: java.lang.SecurityException: caller uid 10103 lacks any of android.permission.GET_ACCOUNTS at android.os.Parcel.readException(Parcel.java:1465) at android.os.Parcel.readException(Parcel.java:1419) at android.accounts.IAccountManager$Stub$Proxy.getAccountsAsUser(IAccountManager.java:647) at android.accounts.AccountManager.getAccountsByTypeAsUser(AccountManager.java:447) at android.accounts.AccountManager.getAccountsByType(AccountManager.java:441) at com.google.api.client.googleapis.extensions.android.accounts.GoogleAccountManager.getAccountByName(GoogleAccountManager.java:80) at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.setSelectedAccountName(GoogleAccountCredential.java:137) at com.thebluealliance.androidclient.accounts.AccountHelper.getSelectedAccountCredential(AccountHelper.java:139) at com.thebluealliance.androidclient.accounts.AccountHelper.getAuthedTbaMobile(AccountHelper.java:151) at com.thebluealliance.androidclient.background.UpdateMyTBA.doInBackground(UpdateMyTBA.java:65) at com.thebluealliance.androidclient.background.UpdateMyTBA.doInBackground(UpdateMyTBA.java:29) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841) 11-20 14:50:23.650 752-1114/? W/ActivityManager﹕ Force finishing activity com.thebluealliance.androidclient/.activities.HomeActivity 11-20 14:50:23.930 752-24718/? W/AccountManagerService﹕ caller uid 10103 lacks any of android.permission.GET_ACCOUNTS 11-20 14:50:23.940 12623-12666/? W/dalvikvm﹕ threadid=12: thread exiting with uncaught exception (group=0x415b4ba8) 11-20 14:50:23.950 1095-1095/? W/HandlerScheduledExecuto﹕ Task does not implement UiTask. Consider using NamedUiRunnable for eww@42ddfa50 11-20 14:50:23.990 752-1597/? W/InputMethodManagerService﹕ Got RemoteException sending setActive(false) notification to pid 12623 uid 10103 11-20 14:50:24.000 1042-1053/? W/Binder﹕ Caught a RuntimeException from the binder stub implementation. java.lang.NullPointerException at android.inputmethodservice.IInputMethodWrapper.setSessionEnabled(IInputMethodWrapper.java:280) at com.android.internal.view.IInputMethod$Stub.onTransact(IInputMethod.java:129) at android.os.Binder.execTransact(Binder.java:404) at dalvik.system.NativeStart.run(Native Method) 11-20 14:50:24.010 186-186/? W/SurfaceFlinger﹕ couldn't log to binary event log: overflow. 11-20 14:50:24.120 752-2908/? E/qcom_sensors_hal﹕ hal_process_report_ind: Bad item quality: 11 11-20 14:50:31.230 752-2908/? E/qcom_sensors_hal﹕ hal_process_report_ind: Bad item quality: 11 11-20 14:50:32.370 752-2908/? E/qcom_sensors_hal﹕ hal_process_report_ind: Bad item quality: 11 11-20 14:50:35.470 752-2908/? E/qcom_sensors_hal﹕ hal_process_report_ind: Bad item quality: 11 11-20 14:50:36.610 752-2908/? E/qcom_sensors_hal﹕ hal_process_report_ind: Bad item quality: 11 11-20 14:50:55.250 752-2908/? E/qcom_sensors_hal﹕ hal_process_report_ind: Bad item quality: 11 11-20 14:50:58.820 752-2908/? E/qcom_sensors_hal﹕ hal_process_report_ind: Bad item quality: 11 

The text was updated successfully, but these errors were encountered:

Источник

Stuck on an issue?

question-mark

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Talk to a Lightrun Answers expert

[INFO] java.lang.SecurityException: Given calling package android does not match caller’s uid

Issue Description

I don’t know it’s a real issue of RemotePreferences, I report for info to other users. With Xposed and similar projects, it is not possible to have the Context of hooked application, thank to @MPeti1 and the info in issue #3 there was a good alternative for old versions of Android.

Context systemContext = (Context) XposedHelpers.callMethod( XposedHelpers.callStaticMethod( XposedHelpers.findClass("android.app.ActivityThread", loadPackageParam.classLoader), "currentActivityThread"), "getSystemContext" ); 

With this row we can get the context of package “android” and is good for create the object RemotePreferences. With Android 8 and 8.1, the context “android” can query the Provider without exception. I’m testing an old module which use RemotePreferences on Android 10 (LineageOS 17.1) and LSPosed, but everytime my module from handleLoadPackage try to query the provider I got this exception:

 java.lang.SecurityException: Given calling package android does not match caller's uid 10161 at android.os.Parcel.createException(Parcel.java:2071) at android.os.Parcel.readException(Parcel.java:2039) at android.os.Parcel.readException(Parcel.java:1987) at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:5056) at android.app.ActivityThread.acquireProvider(ActivityThread.java:6561) at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2725) at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:2117) at android.content.ContentResolver.query(ContentResolver.java:928) at android.content.ContentResolver.query(ContentResolver.java:880) at android.content.ContentResolver.query(ContentResolver.java:836) at com.crossbowffs.remotepreferences.RemotePreferences.query(RemotePreferences.java:214) at com.crossbowffs.remotepreferences.RemotePreferences.querySingle(RemotePreferences.java:263) at com.crossbowffs.remotepreferences.RemotePreferences.getBoolean(RemotePreferences.java:135) 

I tried to set strictmode to true without success, I tried the solution in issue #12 setExecutable(true, false) and setReadable(true, false) without success. Android check the name of package in context (“android”) and the uid of caller (my hooked application) and with mismatch throw an exception.

So I think this project is useless with *Posed and new Android if this check can’t be disabled.

From Readme: «This library was developed to simplify Xposed module preference access. » In the past sure, now not more.

Issue Analytics

Источник

Оцените статью