AppLovin / AppLovin-MAX-SDK-Android

Other
232 stars 104 forks source link

AppLovinMaxSdk never complete initialization #730

Closed k-morozumi closed 3 weeks ago

k-morozumi commented 1 month ago

MAX SDK Version

13.0.0, 12.6.0

Device/Platform Info

Android 13/SH-54B, Android 14/Google Pixel 6a, Android 8.0/emulator

Current Behavior

AppLovinSdk.getInstance(context).initialize() never call complete listener. All ads are not displayed or exception occurs.

AppLovinSdk.getInstance(context).initialize(
    initConfig,
    {
        // never reach here.
        Log.d("AppLovinSdk initialized.")
    }
)

And mediation debugger show us initializing ... endlessly.

Expected Behavior

initializing normally.

How to Reproduce

This problem only occurs with certain combinations of devices and operating systems. It did not occur on Android 12L/Google Pixel 6a combination.

Reproducible in the demo app?

Yes

Additional Info

No response

applovinAsh commented 1 month ago

@k-morozumi, Can you provide the full, unfiltered verbose logs from the start of a session so we can investigate your issue? To enable verbose logs, see here: https://developers.applovin.com/en/max/faq/how-to-enable-verbose-logging-in-the-applovin-sdk

k-morozumi commented 1 month ago

Here is logs. 2024OCT18_001.log

applovinAsh commented 1 month ago

The logs suggest that you may be using our demo application to test. However, I am unable to recreate the issue. Can you provide the project in a zip folder?

If you are not using our demo project and are still experiencing the issue adding implementation 'com.google.android.gms:play-services-tasks:17.1.0' to your application's build.gradle file may help.

k-morozumi commented 1 month ago

Can you provide the project in a zip folder?

The demo project we recognized this problem is here. I think it it should be the same as the latest master branch (for Android).

AppLovin-MAX-SDK-Android-master.zip

applovinAsh commented 1 month ago

Thank you for providing the zip file. It's just our demo project without any additional changes, right? I was unable to recreate the issue that you are describing. I had a similar error to the one in the logs, and to fix I had to add implementation 'androidx.browser:browser:1.4.0' to the build.gradle file. You may also need to add implementation 'com.google.android.gms:play-services-tasks:17.1.0'.

If you have done that and are still experiencing the issue, please send an updated verbose log from the start of a session.

k-morozumi commented 1 month ago

Thank you for reply.

I added implementation 'androidx.browser:browser:1.4.0' at app:dependencies, but not resolved. ('com.google.android.gms:play-services-tasks:17.1.0' already is in demo project.)

And I attached the log with details and ANR traces. I hpe these logs will help to find a solution.

2024OCT24_003.log 2024OCT24_traces.txt

applovinAsh commented 1 month ago

Thank you for providing additional information. Can you provide device specifics where you are seeing this issue like device name, android version, android SDK version and where you are testing from?

k-morozumi commented 1 month ago

Thank you for your reply.

Device emulator(AVD)

AVD editor screenshots so-02h_2024-10-28_13 05 36 so-02h_2024-10-28_13 05 50 so-02h_2024-10-28_13 06 03

Android Version 8.0

Android SDK Version 34

And as I wrote in this issue's body, it is also happening at Android13/SH-54B and Android 14/Google Pixel 6a.

applovinAsh commented 4 weeks ago

We are unable to recreate the issue and have had no other reports. I have collaborated with engineering, and we have released a fix for your current error in SDK version 12.1.0. Can you try invalidating caches and restarting Android Studio? You can do this by going to File > Invalidate Caches... > Invalidate and Restart

k-morozumi commented 3 weeks ago

Thank you for version 12.1.0. I will try with this version.

k-morozumi commented 3 weeks ago

Only for the emulator, but the initialization was succeed after wiping data (using version 12.1.0.). It could be due to the user's data on the device, not problems for SDK, so we close this issue for a moment.

Thank you for your help.