Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Compatibility Issue with Facebook SDK 4.38.0 #46

Closed
halfhp opened this issue Oct 29, 2018 · 12 comments · Fixed by #48
Closed

Compatibility Issue with Facebook SDK 4.38.0 #46

halfhp opened this issue Oct 29, 2018 · 12 comments · Fixed by #48

Comments

@halfhp
Copy link

halfhp commented Oct 29, 2018

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
Copy link
Contributor

rogerhu commented Oct 30, 2018

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

@halfhp
Copy link
Author

halfhp commented Oct 30, 2018

@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
Copy link

mwmw7 commented Nov 5, 2018

@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
Copy link

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
Copy link

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
Copy link

laderjk commented Nov 25, 2018

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

@SethT29
Copy link

SethT29 commented Nov 27, 2018

still nothing ?

@Jawnnypoo
Copy link
Member

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
Copy link
Contributor

rogerhu commented Nov 27, 2018

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

@SethT29
Copy link

SethT29 commented Nov 27, 2018

@rogerhu great!

@freespirit
Copy link

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants