Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug Applovin ad module crashes.

Discussion in 'Unity Mediation' started by astttt, Jul 6, 2022.

  1. astttt

    astttt

    Joined:
    Dec 2, 2021
    Posts:
    3
    I am trying Unity Mediation, and added some ad modules under it.
    Among those ad modules, I have been facing issue in Applovin module.
    I develop Android app only and use Rewarded Ad only. I have installed Applovin connector from Unity Editor (by clicking the button)

    After several days of implementation, I have noticed that the fill rate of Applovin module has been 0%. Also I have found that when an Applovin ad is going to shown, the app crashes, with following error messages.

    ---
    Caused by java.lang.AbstractMethodError
    abstract method "void com.google.android.exoplayer2.Player$Listener.onEvents(com.google.android.exoplayer2.Player, com.google.android.exoplayer2.Player$Events)"
    ---

    I do not know what this really is, but seeing some online forums, it seems the discrepancy of the version of something called "exoplayer" or some declaration on "gradle" is needed (this I do not know or I do not want to know since manual management of gradle may cause unexpected problems now or in the future)

    How this can be solved?
     
    Last edited: Jul 6, 2022
    Mikely9 likes this.
  2. jcGrenier

    jcGrenier

    Unity Technologies

    Joined:
    Feb 23, 2021
    Posts:
    83
    Hi @astttt,
    Without more information it is hard to give a full solution. If you could give us a full android log we can take a look :)
     
  3. astttt

    astttt

    Joined:
    Dec 2, 2021
    Posts:
    3
    Thank you for response. Some other messages I got as as below.

    When I disable Applovin on waterfall lines, the error stops, and enable again, the flow of crashes comes again.

    ---
    Caused by java.lang.AbstractMethodError: abstract method "void com.google.android.exoplayer2.Player$Listener.onEvents(com.google.android.exoplayer2.Player, com.google.android.exoplayer2.Player$Events)"
    at com.google.android.exoplayer2.ExoPlayerImpl.lambda$new$0(ExoPlayerImpl.java:190)
    at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$-xxxxxxxxIw.invoke:)4)
    at com.google.android.exoplayer2.util.ListenerSet$ListenerHolder.iterationFinished(ListenerSet.java:272)
    at com.google.android.exoplayer2.util.ListenerSet.handleMessage(ListenerSet.java:224)
    at com.google.android.exoplayer2.util.ListenerSet.lambda$gt28PMxxxxxxxxxxxP9kmalg()
    at com.google.android.exoplayer2.util.-$$Lambda$ListenerSet$gt28xxxxxxxxxxxxxx9kmalg.handleMessage:)2)
    at android.os.Handler.dispatchMessage(Handler.java:103)
    at android.os.Looper.loop(Looper.java:237)
    at android.app.ActivityThread.main(ActivityThread.java:8167)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
    firebase-installations-executor-11
    at sun.misc.Unsafe.park(Unsafe.java)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2109)
    at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1091)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)

    AL-Network-3
    at sun.misc.Unsafe.park(Unsafe.java)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067)
    at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:548)
    at com.applovin.impl.sdk.network.e$a.a:)2)
    at com.applovin.impl.sdk.network.e$a.run:)5)

    UnityMain
    at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
    at android.os.MessageQueue.next(MessageQueue.java:336)
    at android.os.Looper.loop(Looper.java:197)
    at com.unity3d.player.UnityPlayer$e.run:)20)

    AssetPackService
    at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
    at android.os.MessageQueue.next(MessageQueue.java:336)
    at android.os.Looper.loop(Looper.java:197)
    at android.os.HandlerThread.run(HandlerThread.java:67)

    AppLovinSdk:com.applovin.communicator
    at sun.misc.Unsafe.park(Unsafe.java)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:849)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)
    ---
     
    Last edited: Jul 7, 2022
  4. Mikely9

    Mikely9

    Joined:
    Jan 30, 2018
    Posts:
    4
    I'm experiecing same issue after updating IronSource SDK (7.2.3.1) with AppLovin mediation adapter (4.3.36) - the crashes on Android devices significantly increased above bad behavior treshold

    edit:
    @astttt, seems like adding "android.enableDexingArtifactTransform=false" to gradle.properties should fix these crashes
     
    Last edited: Jul 8, 2022
    inovixion110 and qa_unity507 like this.
  5. s-sixteen

    s-sixteen

    Joined:
    Aug 22, 2015
    Posts:
    7
    We are having exactly the same issue using AdMob with AppLovin mediation (SDK version 11.4.4). We also have lots of Android logs if you need more data
     
  6. wisesm1

    wisesm1

    Unity Technologies

    Joined:
    Sep 15, 2017
    Posts:
    9
    Hi folks, we've identified the issue to be a conflict with dependency resolution for the version of the play-services-basement (in this case, major version update between 17.x and 18.x) package used by the AppLovin sdk. We will be rolling out an update in our 1.0.0 release that allows for more flexibility of the play-services-basement module version between our sdk, applovin, and additional 3rd party sdks and will maintain this in future patches.

    Expect the update soon (the next couple of weeks)!
     
    DeclanMcPartlin likes this.
  7. wisesm1

    wisesm1

    Unity Technologies

    Joined:
    Sep 15, 2017
    Posts:
    9
    Hi all, quick update, we've released a Unity Mediation SDK patch (0.5.1) to tackle the above issue. Let us know if things have improved! If not, we can give this another round of investigation.
     
    DeclanMcPartlin likes this.
  8. Roman3445

    Roman3445

    Joined:
    Nov 28, 2012
    Posts:
    6
    wisesm1, it still happens after updating Unity Mediation SDK to patch (0.5.1). But Mikely9 advice helped, now AppLovin ads plays correctly
     
    wisesm1 likes this.
  9. inovixion110

    inovixion110

    Joined:
    Jul 16, 2021
    Posts:
    1
    Im going to try this in my app, will test in alpha and update here if this helps. Thankyou
     
  10. sonnguyen9800

    sonnguyen9800

    Joined:
    Dec 9, 2020
    Posts:
    3
    Hello, we are currently using ironSource 7.2.4 (lastest version), combined with Unity Ads (4.3.27.1) and AppLoving (4.3.38.1), which are also the latest version as well. The build was 2020.3.34f1

    We are facing a similar issue on at least 2 Android models: Samsung S7 (Android 8) and Samsung A11 (Android 11). The app crash when it attempts to play ad. The log was very similar to the OP's

    2022-08-20 22:22:12.989 31221-31221/(APP-NAME) E/AndroidRuntime: FATAL EXCEPTION: main
    Process: (APP-NAME), PID: 31221
    java.lang.AbstractMethodError: abstract method "void com.google.android.exoplayer2.Player$Listener.onEvents(com.google.android.exoplayer2.Player, com.google.android.exoplayer2.Player$Events)"
    at com.google.android.exoplayer2.ExoPlayerImpl.lambda$new$0(ExoPlayerImpl.java:190)
    at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$UMmGNfcim22-ZQE5xPIiuQlvYIw.invoke(Unknown Source:4)
    at com.google.android.exoplayer2.util.ListenerSet$ListenerHolder.iterationFinished(ListenerSet.java:272)
    at com.google.android.exoplayer2.util.ListenerSet.handleMessage(ListenerSet.java:224)
    at com.google.android.exoplayer2.util.ListenerSet.lambda$gt28PMFfhLXGfIVY4v7eP9kmalg(Unknown Source:0)
    at com.google.android.exoplayer2.util.-$$Lambda$ListenerSet$gt28PMFfhLXGfIVY4v7eP9kmalg.handleMessage(Unknown Source:2)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:246)
    at android.app.ActivityThread.main(ActivityThread.java:8653)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
    (log end)

    Furthermore, prior to the crash above, we noticed that ironSource could not find appropriate ads when the app starts. The log was:

    2022-08-20 21:56:53.785 22266-22266/[HIDE ON PURPOSE] E/ironSourceSDK: ADAPTER_CALLBACK: AdMobRewardedVideoAdLoadListener onAdFailedToLoad - adapterError = No ads meet eCPM floor. <https://support.google.com/admob/answer/9905175#8>( 3 )
    2022-08-20 21:56:53.786 22266-22266/[HIDE ON PURPOSE] E/ironSourceSDK: ADAPTER_CALLBACK: AdMobRewardedVideoAdLoadListener onAdFailedToLoad - adapterError = No Fill
    2022-08-20 21:56:57.241 22266-22266/[HIDE ON PURPOSE] E/ironSourceSDK: ADAPTER_CALLBACK: UnityAdsRewardedVideoListener onUnityAdsFailedToLoad - placementId = [HIDE ON PURPOSE] ironSourceError = errorCode:1058, errorMessage:placement receives no fill
    (log end)
    As we update ironSource and other packages, this crash affect less devices but still exist!

    Roman3445: Could you kindly elaborate about the exact file to be modified according to Mikely9's advice (gradle.properties)? Unfortunately, I could not find where to edit.
     
  11. wisesm1

    wisesm1

    Unity Technologies

    Joined:
    Sep 15, 2017
    Posts:
    9
    Thanks for the update in the thread. In the meantime, since it's been noted that adding `android.enableDexingArtifactTransform=false` to the project gradle.properties appears to solve the issue, we will look into why this works and include it in our troubleshooting guide.
     
unityunity