AppLovin / AppLovin-MAX-SDK-Android

Other
233 stars 104 forks source link

Mediated Unity Ads Upgrade to 4.9.2.1 Messing with Other Unrelated Packages #614

Closed Murilomsq closed 1 week ago

Murilomsq commented 10 months ago

MAX SDK Version

12.1.0

Device/Platform Info

Android (All platforms)

Current Behavior

Upgrading Mediated Unity Ads package to version 4.9.2.1 from the AppLovin integration manager triggers a crash when built to android. After upgrading, whenever anything related to the FacebookSdk package gets called a crash happens with the following trace:

2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime FATAL EXCEPTION: main
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime Process: com.cerberusinteractive.atlasempiresdev, PID: 23952
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/FacebookActivity;
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at com.facebook.login.LoginManager.getFacebookActivityIntent(LoginManager.kt:1081)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at com.facebook.login.LoginManager.tryFacebookActivity(LoginManager.kt:1061)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at com.facebook.login.LoginManager.startLogin(LoginManager.kt:999)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at com.facebook.login.LoginManager.logIn(LoginManager.kt:734)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at com.facebook.login.LoginManager.logInWithReadPermissions(LoginManager.kt:460)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at com.facebook.unity.FBLogin.login(FBLogin.java:163)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at com.facebook.unity.FBLogin.loginWithReadPermissions(FBLogin.java:44)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at com.facebook.unity.FBUnityLoginActivity.onCreate(FBUnityLoginActivity.java:40)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.app.Activity.performCreate(Activity.java:8232)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.app.Activity.performCreate(Activity.java:8212)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1331)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3724)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3919)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2311)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.os.Handler.dispatchMessage(Handler.java:111)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.os.Looper.loopOnce(Looper.java:238)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.os.Looper.loop(Looper.java:357)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at android.app.ActivityThread.main(ActivityThread.java:8090)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at java.lang.reflect.Method.invoke(Native Method)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
2024/01/17 16:10:44.114 23952 23952 Error AndroidRuntime Caused by: java.lang.ClassNotFoundException: com.facebook.FacebookActivity

Expected Behavior

No response

How to Reproduce

Have FacebookSdk set up Upgrade Mediated Unity Ads to version 4.9.2.1 via Applovin integration manager Build for android and use anything from the facebook sdk

Additional Info

The class com.facebook.FacebookActivity is somehow getting stripped by the new UnityAds mediated sdk

I tried adding custom Proguard rules to prevent it from being stripped by UnityAds Proguard but no matter the way i set it up it still kept happening.

proguard-user.txt

-keep class com.facebook.** { *; }

also added it to all grade templates like

[...]Template.gradle

buildTypes {
        debug {
            minifyEnabled **MINIFY_DEBUG**
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-user.txt' **SIGNCONFIG**
            jniDebuggable true
        }
        release {
            minifyEnabled **MINIFY_RELEASE**
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-user.txt' **SIGNCONFIG**
        }
    }**PACKAGING_OPTIONS****SPLITS**

But the problem seem to keep ocurring so i'm assuming its not proguard.

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 week ago

This issue was closed because it has been inactive for 5 days since being marked as stale.