Fatal Exception: java.lang.ClassCastException j8.n cannot be cast to java.util.concurrent.CountDownLatch
Checklist before submitting a bug report
- [x] I've updated to the latest released version of the SDK
- [x] I've searched for existing Github issues
- [x] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [x] I've read the Code of Conduct
- [x] This issue is not security related and can safely be disclosed publicly on GitHub
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
Facing the same issue. I have only recently used the latest sdk to integrate login. Would downgrading to an old version fix this?
same question when I update AGP to 8.10.0, can receive this bug in firebase
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"/>
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?
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 *; }
Dont close issue. SDK should be fixed.
You are right, reopened
In my case this crash sometimes occurs with RevenueCat library