AppLovin/AppLovin-MAX-Unity-Plugin

Failed to register impression on Android. Unauthorized caller. Caller is not allowed.

onurclb opened this issue · 1 comments

MAX Plugin Version

6.5.2

Unity Version

2022.3.28f1

Device/Platform Info

Samsung A35 (Android 14),Samsung A54 (Android 14),Samsung S10 (Android 12)

Current Behavior

I am encountering an issue with the AppLovin MAX Unity SDK where my app receives an unauthorized caller error. The error log indicates that my package is not allowed to call the API. This issue prevents the registration of ad impressions. I encountered this error on the interstitial hidden callback. My Unity activity is not enabled after interstitial closed. This issue occurs unpredictably, sometimes on the 3rd ad impression, and other times on the 50th ad impression.

Error Log:

adservices              com.google.android.adservices.api    E  Unauthorized caller. Caller is not allowed.
adservices              com.google.android.adservices.api    E  Package xxx.xxx.xxx is not allowed to call the API.
AppLovinSdk            xxx.xxx.xxx             E  [PrivacySandboxService] Failed to register impression
                                                                                                    java.lang.SecurityException: Caller is not authorized to call this API. Caller is not allowed.
                                                                                                        at android.adservices.common.AdServicesStatusUtils.asException(AdServicesStatusUtils.java:180)
                                                                                                        at android.adservices.common.AdServicesStatusUtils.asException(AdServicesStatusUtils.java:198)
                                                                                                        at android.adservices.measurement.MeasurementManager$1.lambda$onFailure$1(MeasurementManager.java:220)
                                                                                                        at android.adservices.measurement.MeasurementManager$1$$ExternalSyntheticLambda0.run(Unknown Source:4)
                                                                                                        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
                                                                                                        at java.util.concurrent.FutureTask.run(FutureTask.java:264)
                                                                                                        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
                                                                                                        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)

Expected Behavior

No response

How to Reproduce

Attempt to register an ad impression.

Expected Behavior:
The app should be authorized to call the API and successfully register ad impressions without encountering a security exception.

Actual Behavior:
The app encounters a java.lang.SecurityException stating that the caller is not authorized to call the API.

Additional Info

No response

@onurclb - to confirm, you are not explicitly trying to register an impression right, and you are just observing this error message in our SDK? If so, could you enable and send over our SDK's verbose logs so we can see what is triggering that code path?