Closed shen714 closed 1 year ago
Hi, would like to provide more details on this issue.
The 'Measurement API is disabled' issue is solved by using the latest AS canary Hedgehog and updating the UDC to version 4(this is not all true. It only works for the first few 'registerSource' after installing a new emulator and then 'Measurement API is disabled' again, while I verified all the configs are enabled. Wondering if there is new limitation on the number of times a source is registered).
But there is new error when calling the registerSource API
2023-05-11 11:20:20.121 571-1103 ContentProviderHelper system_server W Permission Denial: opening provider com.android.adservices.service.measurement.registration.AsyncRegistrationContentProvider from ProcessRecord{d0f8924 6010:com.google.android.adservices.api/u0a168} (pid=6010, uid=10168) that is not exported from UID 10159 2023-05-11 11:20:20.124 6010-6381 adservices com.google.android.adservices.api W Underlying datastore version: 11 2023-05-11 11:20:20.134 6010-6381 adservices com.google.android.adservices.api E Unhandled exception thrown during transaction java.lang.SecurityException: Permission Denial: opening provider com.android.adservices.service.measurement.registration.AsyncRegistrationContentProvider from ProcessRecord{d0f8924 6010:com.google.android.adservices.api/u0a168} (pid=6010, uid=10168) that is not exported from UID 10159 at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:5702) at android.app.ActivityThread.acquireProvider(ActivityThread.java:7303) at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:3649) at android.content.ContentResolver.acquireProvider(ContentResolver.java:2487) at android.content.ContentResolver.acquireContentProviderClient(ContentResolver.java:2565) at com.android.adservices.service.measurement.registration.EnqueueAsyncRegistration.notifyContentProvider(EnqueueAsyncRegistration.java:201) at com.android.adservices.service.measurement.registration.EnqueueAsyncRegistration.insertAsyncRegistration(EnqueueAsyncRegistration.java:196) at com.android.adservices.service.measurement.registration.EnqueueAsyncRegistration.lambda$appSourceOrTriggerRegistrationRequest$0(EnqueueAsyncRegistration.java:60) at com.android.adservices.service.measurement.registration.EnqueueAsyncRegistration.$r8$lambda$aJIZTSoD-TM00XJPs55Ki0X-fvA(EnqueueAsyncRegistration.java:0) at com.android.adservices.service.measurement.registration.EnqueueAsyncRegistration$$ExternalSyntheticLambda0.accept(R8$$SyntheticClass:0) at com.android.adservices.data.measurement.DatastoreManager.lambda$runInTransaction$0(DatastoreManager.java:116) at com.android.adservices.data.measurement.DatastoreManager.$r8$lambda$H1c24kOxtwIVwS1Iwri8szpzOBM(DatastoreManager.java:0) at com.android.adservices.data.measurement.DatastoreManager$$ExternalSyntheticLambda0.apply(R8$$SyntheticClass:0) at com.android.adservices.data.measurement.DatastoreManager.runInTransactionWithResult(DatastoreManager.java:89) at com.android.adservices.data.measurement.DatastoreManager.runInTransaction(DatastoreManager.java:115) at com.android.adservices.service.measurement.registration.EnqueueAsyncRegistration.appSourceOrTriggerRegistrationRequest(EnqueueAsyncRegistration.java:58) at com.android.adservices.service.measurement.MeasurementImpl.register(MeasurementImpl.java:158) at com.android.adservices.service.measurement.MeasurementServiceImpl.lambda$register$0(MeasurementServiceImpl.java:176) at com.android.adservices.service.measurement.MeasurementServiceImpl.$r8$lambda$Bm3Ut0d7yJuoqsOZnG3wNXuoAhw(MeasurementServiceImpl.java:0) at com.android.adservices.service.measurement.MeasurementServiceImpl$$ExternalSyntheticLambda16.accept(R8$$SyntheticClass:0) at com.android.adservices.service.measurement.MeasurementServiceImpl.performRegistration(MeasurementServiceImpl.java:529) at com.android.adservices.service.measurement.MeasurementServiceImpl.lambda$register$2(MeasurementServiceImpl.java:174) at com.android.adservices.service.measurement.MeasurementServiceImpl.$r8$lambda$_nhH94Ha5IHxR1sioVTlgT7NORE(MeasurementServiceImpl.java:0) at com.android.adservices.service.measurement.MeasurementServiceImpl$$ExternalSyntheticLambda0.run(R8$$SyntheticClass:0) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012) Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.am.ContentProviderHelper.checkAssociationAndPermissionLocked(ContentProviderHelper.java:679) at com.android.server.am.ContentProviderHelper.getContentProviderImpl(ContentProviderHelper.java:280) 2023-05-11 11:20:20.134 6010-6381 adservices com.google.android.adservices.api E at com.android.server.am.ContentProviderHelper.getContentProvider(ContentProviderHelper.java:142) at com.android.server.am.ActivityManagerService.getContentProvider(ActivityManagerService.java:6640) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2655) 2023-05-11 11:20:20.148 6010-6381 AndroidRuntime com.google.android.adservices.api W A resource failed to call close. 2023-05-11 11:20:20.162 571-1394 ActivityTaskManager system_server W Force finishing activity com.google.android.adservices.api/com.android.adservices.ui.settings.activities.AdServicesSettingsMainActivity 2023-05-11 11:20:20.184 6010-638
Hello! AdServices is currently disabled on UDC, please try testing with Android T. If you are still seeing this error on Android T, please make sure the kill switch is disabled by running
adb shell device_config put adservices measurement_kill_switch false
Thank you!!Thanks for the quick response! Unfortunately, either UDC and T has some issues blocking us.
adb shell device_config put adservices adid_kill_switch false
and seems resolved the issue.The issue is resolved by using adb shell device_config put adservices adid_kill_switch false
and adb shell device_config put adservices measurement_kill_switch false
on UDC.
Hi, I have been testing Measurement API on UpsideDownCake for a while and It has worked fine. The last time I tested it successfully is last Thursday.
This morning(05/08) I found that the "Measurement API is disabled" issue came up after I setting up everything instructed here. And I didn't change anything from my side.
I am wondering if there is any update from Google that I missed. Thanks!
error message: