Facebook SDK for Android throwing ClassNotFound exception
Asked Answered
D

1

14

My latest version of the app has been throwing this error occasionally:

Caused by: java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = com.facebook.friends.constants.FriendRequestMakeRef)

Here is the stack down to the line which causes it:

   at android.os.Parcel.readSerializable(Parcel.java:2148)
   at android.os.Parcel.readValue(Parcel.java:2016)
   at android.os.Parcel.readMapInternal(Parcel.java:2226)
   at android.os.Bundle.unparcel(Bundle.java:223)
   at android.os.Bundle.getString(Bundle.java:1055)
   at android.content.Intent.getStringExtra(Intent.java:4426)

It's being thrown when I do getStringExtra on a Bundle as you can see. It looks like the Facebook SDK is adding an object to the bundle that upon reading, cannot find a class for and then crashes. The string I'm looking for on this line has nothing to do with Facebook.

I haven't changed anything related to the Facebook SDK for a long time, but all of the sudden this is popping up. I attribute it to my switch from the old ANT style compilation to Gradle, as that's the only thing that changed between the older versions and this new version getting the error.

Anyways, I searched around and found literally nothing on this. What's more, I don't blame it for crashing, the Facebook SDK version I'm using doesn't even have a package com.facebook.friends.constants

Has anyone run into this?

Decillion answered 2/7, 2014 at 22:31 Comment(7)
I'm having the exact same problem, did you find anything about this?Huck
Nothing yet. I'm unable to recreate it myself, and while it doesn't happen to very many users it is still a live bug for us.Decillion
I'm seeing the same issue. I created a bug report: github.com/facebook/facebook-android-sdk/issues/377Huck
I'm also facing a similar problem but couldn't find a solution. This question and your github link are the only resources I am able to find .Is there any other sources that i should look upon? Any updates on the issue are welcome.Bowman
Sorry, I'm still having this problem and haven't figured it outDecillion
Using dexguard? This is a year old, @avk are you using the latest sdk and seeing the same error?Greyso
Upgraded to 4.0.1. and it works.Mountfort
H
1

Upgrading SDK to the latest version will solve the problem

Hoppe answered 5/5, 2015 at 9:40 Comment(1)
this should be comment.Harquebusier

© 2022 - 2024 — McMap. All rights reserved.