facebook-android-sdk icon indicating copy to clipboard operation
facebook-android-sdk copied to clipboard

Fatal Exception: java.lang.ClassCastException j8.n cannot be cast to java.util.concurrent.CountDownLatch

Open SzGajdzica opened this issue 11 months ago • 8 comments

Checklist before submitting a bug report

Java version

1.8

Android version

36

Android SDK version

36.0.0

Installation platform & version

Gradle 8.10.0

Package

Login

Goals

Eliminate crash in my app

Expected results

No crash

Actual results

Fatal Exception: java.lang.ClassCastException: j8.n cannot be cast to java.util.concurrent.CountDownLatch
   at com.facebook.appevents.ondeviceprocessing.RemoteServiceWrapper$RemoteServiceConnection.onNullBinding(RemoteServiceWrapper.java:157)
   at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2196)
   at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2225)
   at android.os.Handler.handleCallback(Handler.java:900)
   at android.os.Handler.dispatchMessage(Handler.java:103)
   at android.os.Looper.loop(Looper.java:219)
   at android.app.ActivityThread.main(ActivityThread.java:8668)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)

Steps to reproduce

Got it reported on Firebase, just randomly crashes after few seconds after user opened app

Code samples & details


SzGajdzica avatar May 22 '25 05:05 SzGajdzica

Facing the same issue. I have only recently used the latest sdk to integrate login. Would downgrading to an old version fix this?

vhmvd avatar May 22 '25 19:05 vhmvd

same question when I update AGP to 8.10.0, can receive this bug in firebase

jinfeng-500px avatar May 26 '25 09:05 jinfeng-500px

I Added this code to manifest, will give you feedback if that helps after app update is released <meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled" android:value="false"/>

SzGajdzica avatar May 26 '25 09:05 SzGajdzica

I Added this code to manifest, will give you feedback if that helps after app update is released <meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled" android:value="false"/>

@SzGajdzica did it fix the crash?

grosalex avatar Jun 12 '25 07:06 grosalex

No, but i found another solution that completly fixes this issue! Just add this to the proguard -keepclassmembernames class com.facebook.appevents.ondeviceprocessing.** { java.util.concurrent.CountDownLatch *; }

SzGajdzica avatar Jun 12 '25 07:06 SzGajdzica

Dont close issue. SDK should be fixed.

Image

kk-atom avatar Jun 12 '25 08:06 kk-atom

You are right, reopened

SzGajdzica avatar Jun 12 '25 08:06 SzGajdzica

In my case this crash sometimes occurs with RevenueCat library

Image

alexgolenkevich avatar Jun 19 '25 15:06 alexgolenkevich