parse-community / ParseFacebookUtils-Android

A utility library to authenticate ParseUsers with the Facebook SDK
http://docs.parseplatform.org/android/guide/#facebook-users
Other
53 stars 63 forks source link

Compatibility Issue with Facebook SDK 4.38.0 #46

Closed halfhp closed 5 years ago

halfhp commented 5 years ago

It appears that FacebookController is using a constructor for AccessToken that no longer exists. It looks like FB wants dataAccessExpirationTime to be passed in now too. According to the Javadocs this new property can be set to null, however I have not looked to see what the consequences of doing that would be.

NOTE: I mention 4.38.0 since that's what the project I'm currently working on uses, but I wouldn't be surprised if this is broken in older versions as well.

rogerhu commented 5 years ago

Can you take a look? Happy to accept a pull request for any updates.

halfhp commented 5 years ago

@rogerhu I poked around a bit but I couldn't get to a point where I feel confident in saying that passing in null is the right fix. null causes a default dataAccessExpirationTime of what effectively amounts to "never" to be used. FB's documentation on why this might matter is pretty much non existent and I've run out of time to hunt :(

FWIW, The next most recent FB SDK version (4.37.0) still uses the old constructor, so using that version fixes this particular issue, for my purposes at least.

mwmw7 commented 5 years ago

@rogerhu I have the same issue image

Fatal Exception: java.lang.NoSuchMethodError: No direct method (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Collection;Ljava/util/Collection;Lcom/facebook/AccessTokenSource;Ljava/util/Date;Ljava/util/Date;)V in class Lcom/facebook/AccessToken; or its super classes (declaration of 'com.facebook.AccessToken' appears in base.apk) at com.parse.FacebookController.setAuthData(FacebookController.java:163) at com.parse.ParseFacebookUtils$1.onRestore(ParseFacebookUtils.java:113) at com.parse.ParseAuthenticationManager$2.call(ParseAuthenticationManager.java:70) at com.parse.ParseAuthenticationManager$2.call(ParseAuthenticationManager.java:67) at bolts.Task$4.run(Task.java:357) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)

rafaelpivetta commented 5 years ago

I have the same issue:

java.lang.NoSuchMethodError: No direct method (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Collection;Ljava/util/Collection;Lcom/facebook/AccessTokenSource;Ljava/util/Date;Ljava/util/Date;)V in class Lcom/facebook/AccessToken; or its super classes (declaration of 'com.facebook.AccessToken' appears in /data/app/com.adyourbooks-1/split_lib_dependencies_apk.apk) at com.parse.FacebookController.setAuthData(FacebookController.java:163) at com.parse.ParseFacebookUtils$1.onRestore(ParseFacebookUtils.java:113) at com.parse.ParseAuthenticationManager$2.call(ParseAuthenticationManager.java:70) at com.parse.ParseAuthenticationManager$2.call(ParseAuthenticationManager.java:67) at bolts.Task$4.run(Task.java:357) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

schachan commented 5 years ago

I am also having the same issue.

java.lang.NoSuchMethodError: at com.parse.FacebookController.setAuthData (FacebookController.java:163) at com.parse.ParseFacebookUtils$1.onRestore (ParseFacebookUtils.java:113) at com.parse.ParseAuthenticationManager$2.call (ParseAuthenticationManager.java:70) at com.parse.ParseAuthenticationManager$2.call (ParseAuthenticationManager.java:67) at bolts.Task$4.run (Task.java:357) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636) at java.lang.Thread.run (Thread.java:764)

laderjk commented 5 years ago

Any update on this? I am also having this issue with SDK version 4.38.1

SethT29 commented 5 years ago

still nothing ?

Jawnnypoo commented 5 years ago

As mentioned, you can downgrade to 4.37.0 until this is resolved, and feel free to make a pull request if you find a solution.

rogerhu commented 5 years ago

Right I am happy to tag and release a new version once a fix is issued and verified.

SethT29 commented 5 years ago

@rogerhu great!

freespirit commented 5 years ago

Is it reasonable to provide a null argument for dataAccessExpirationTime as a quick fix until the full grasp of dataAccessExpirationTime is determined and a proper fix is issued?

I would volunteer to do that but I can't advocate such solution until I have understood better how dataAccessExpirationTime is used.

qandeelabbassi commented 5 years ago

Any update on this... With ParseFacebookUtils-Android:1.12.0 and facebook-android-sdk:4.40.0 my app crashes by simply calling loginInBackgroud with same stack trace. Unfortunately i can't use facebook-android-sdk:4.37.0 because it has a bug and its causing crashes