Getting 'No active admin' SecurityException in Android 10 - how to resolve?
Asked Answered
N

5

45

I am encountering an error in the pre-launch report on the Google Play Console during testing. The error message is as follows:

java.lang.SecurityException: No active admin ComponentInfo{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}

This error occurs specifically in Android 10 (SDK 29). The full error summary is as follows:


Exception Process: com.google.android.apps.mtaas.deviceadmin, PID: 4380
java.lang.SecurityException: No active admin ComponentInfo{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
  at android.os.Parcel.createException (Parcel.java:2088)
  at android.os.Parcel.readException (Parcel.java:2056)
  at android.os.Parcel.readException (Parcel.java:2004)
  at android.app.admin.IDevicePolicyManager$Stub$Proxy.setNetworkLoggingEnabled (IDevicePolicyManager.java:15305)
  at android.app.admin.DevicePolicyManager.setNetworkLoggingEnabled (DevicePolicyManager.java:11627)
  at com.google.android.apps.mtaas.deviceadmin.EnableNetworkLogging.onStart (EnableNetworkLogging.kt:27)
  at android.app.Instrumentation$InstrumentationThread.run (Instrumentation.java:2209)
Caused by android.os.RemoteException: Remote stack trace:
  at com.android.server.devicepolicy.DevicePolicyManagerService.getActiveAdminWithPolicyForUidLocked (DevicePolicyManagerService.java:3259)
  at com.android.server.devicepolicy.DevicePolicyManagerService.getActiveAdminOrCheckPermissionForCallerLocked (DevicePolicyManagerService.java:3155)
  at com.android.server.devicepolicy.DevicePolicyManagerService.getActiveAdminForCallerLocked (DevicePolicyManagerService.java:3136)
  at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanManageScopeOrCheckPermission (DevicePolicyManagerService.java:7218)
  at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanManageScope (DevicePolicyManagerService.java:7204)

I need assistance in resolving this specific error. Any help or guidance would be greatly appreciated.

Nonresistance answered 2/6, 2023 at 16:0 Comment(6)
Please anyone can help me with this error. This is really frustrating.Nonresistance
I'd think this is a false positive. It might be the pre-launch report service that actually crashes, but not the app. You can check in the actual crash logs from the users but I doubt you will find the crash there?Shophar
I just got this today when putting up a new app. Unfortunately, its blocking me from publishing the app and it just gets rejected. I tested on more than 1 device and emulator but it only seems to occur on their testing device.Variant
@Variant Were you able to get past review today and pushing rejected or was it already approved for review?Impartial
@Impartial I got it sorted by no actions of mine. I couldn't reproduce the error and decided to instead upload it to an open testing. I woke up the next morning and the release that was marked as problematic was now all of a sudden approved.Variant
@Variant - Same here...Impartial
M
38

Just got the same report a while ago. Looks like there is a problem related to the devices/emulator that Google uses for generating the report.

At least in my case, it is not related to the tested app, since it doesn't have a single dependency on Google libraries

EDIT: You can find a similar report in the Google Issue Tracker: https://issuetracker.google.com/issues/160907013#comment144

Markup answered 2/6, 2023 at 16:57 Comment(4)
Can you please help me with resolving this issue? It is preventing me from proceeding with the production launch.Nonresistance
@RohanHazarika you should be able to ignore the problem and proceed to promote your release to production. Just go to the section where you creare the release and select Promote to ProductionMarkup
Just got this error, "java.lang.SecurityException: No active admin " etc. I am in Internal Testing. I hope I will be able to continue :(Shaunshauna
Hello I am getting the same error now when i upload it to test track. Strange thing is i had provided a new build 1.5 months back and there was no prelaunch error that time (There are minor bug fix in the latest version no major library added or removed), could any body provide a fix to this problem?Breeze
B
25

I just contacted Google Play support about that issue, and this is what they responded:

Support: "Please note that pre-launch reports do not block releases to any tracks."

Support: "It only helps to identify issues proactively before your app reaches testers."

Support: "This means that it only informs you of any possible issues in your testing tracks' new releases, but it does not prevent you from continuing to publish those releases."

Support: "Furthermore, pre-launch reports only test releases you've uploaded to the open, closed, and internal testing tracks; it does not test for releases uploaded to the Production track."

Support: "If you are confident that your release does not have any errors, then you can proceed to ignore the error in the pre-launch report and publish your release."

Support: "For more information about the pre-launch reports, please refer to our Help Center. https://support.google.com/googleplay/android-developer/answer/9842757 "

Me: "So the report does not have an affect on final review before publishing to production, correct?"

Support: "Yes, that is correct."

Bavardage answered 9/6, 2023 at 5:48 Comment(1)
Absolutely stock, standard, typical Google. You get a BIG RED ERROR with absolutely no obvious help or explanation, and it turns out to be likely a bug on their side that doesn't affect anything. Sigh. I know plenty of Googlers and they're all super smart, but man do they suck at this sort of thing...Medardas
C
6

Solution: Do nothing 🌝

Explanation: Pre-launch reports do not block releases to any tracks

Condign answered 24/6, 2023 at 2:46 Comment(0)
D
3

I just got the same error while trying to publish my Flutter app to the Play Store. I removed some packages. Curious enough, this error is with a Samsung device. I'll leave you the stack trace in case it may be useful.

It still appears as "in review" so I'm not sure if I will be able to ignore the error and promote it to production.

Stack trace

java.lang.SecurityException: No active admin ComponentInfo{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}


Exception Process: com.google.android.apps.mtaas.deviceadmin, PID: 6114
java.lang.SecurityException: No active admin ComponentInfo{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
  at android.os.Parcel.createException (Parcel.java:2088)
  at android.os.Parcel.readException (Parcel.java:2056)
  at android.os.Parcel.readException (Parcel.java:2004)
  at android.app.admin.IDevicePolicyManager$Stub$Proxy.setNetworkLoggingEnabled (IDevicePolicyManager.java:15305)
  at android.app.admin.DevicePolicyManager.setNetworkLoggingEnabled (DevicePolicyManager.java:11627)
  at com.google.android.apps.mtaas.deviceadmin.EnableNetworkLogging.onStart (EnableNetworkLogging.kt:27)
  at android.app.Instrumentation$InstrumentationThread.run (Instrumentation.java:2209)

Device that prompts the error

Debauchery answered 8/6, 2023 at 1:38 Comment(1)
Yeah, the problem with Samsung. Native Java app, samsung SM-G981U1Riobard
W
0

This may sound odd, but the real problem causing this is if you have webservice in your application like API calls and you did not do error handling properly like adding you code between

 try{ //
 your webservice request
 }catch(e){
// error handling
} 

and if you have used old libraries or libraries without proper error handling. you will face the same problem. After doing all error handling properly, change the app version name and code in pubspec.yaml as follows version: 1.0.1+2 then run commands flutter clean and flutter build appbundle --release to create a new app bundle

Winne answered 17/7, 2023 at 16:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.