Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package Duplication Conflict when using facebook_app_events with flutter_facebook_login plugins in the same project #56

Closed
MohamadSobhy opened this issue Sep 13, 2020 · 16 comments

Comments

@MohamadSobhy
Copy link

Hi,

I added facebook login feature using the flutter_facebook_login package and it works as excpected but after adding the facebook_app_events to the project to send events to facebook analytics the app crashes when trying to login using facebook for the first time and throws the below exception. after some searching i figured out that this error may happen because of plugins duplication or adding plugin multiple time with different versions. i faced a similar issue on IOS but i solved it by changing the version of the FBSDKCoreKit to 7.1.0 manualy in ios/.symlinks/plugins/flutter_facebook_login/ios/flutter_facebook_login.podspec to be the same as the version which facebook_app_events works on but i can't solve the issue with Android. How can i solve this conflict and prevent package duplication on android? Any Help??

Error Message

java.lang.NoSuchMethodError: No static method createProxyAuthIntent(Landroid/content/Context;Ljava/lang/String;Ljava/util/Collection;Ljava/lang/String;ZZLcom/facebook/login/DefaultAudience;Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent; in class Lcom/facebook/internal/NativeProtocol; or its super classes (declaration of 'com.facebook.internal.NativeProtocol' appears in /data/app/com.newtawfeer-k4dXPHAXLmhz25tQs0r01w==/base.apk!classes2.dex)
E/AndroidRuntime(20938): 	at com.facebook.login.KatanaProxyLoginMethodHandler.tryAuthorize(KatanaProxyLoginMethodHandler.java:44)
E/AndroidRuntime(20938): 	at com.facebook.login.LoginClient.tryCurrentHandler(LoginClient.java:264)
E/AndroidRuntime(20938): 	at com.facebook.login.LoginClient.tryNextHandler(LoginClient.java:216)
E/AndroidRuntime(20938): 	at com.facebook.login.GetTokenLoginMethodHandler.getTokenCompleted(GetTokenLoginMethodHandler.java:119)
E/AndroidRuntime(20938): 	at com.facebook.login.GetTokenLoginMethodHandler$1.completed(GetTokenLoginMethodHandler.java:74)
E/AndroidRuntime(20938): 	at com.facebook.internal.PlatformServiceClient.callback(PlatformServiceClient.java:163)
E/AndroidRuntime(20938): 	at com.facebook.internal.PlatformServiceClient.handleMessage(PlatformServiceClient.java:143)
E/AndroidRuntime(20938): 	at com.facebook.internal.PlatformServiceClient$1.handleMessage(PlatformServiceClient.java:64)
E/AndroidRuntime(20938): 	at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(20938): 	at android.os.Looper.loop(Looper.java:224)
E/AndroidRuntime(20938): 	at android.app.ActivityThread.main(ActivityThread.java:7560)
E/AndroidRuntime(20938): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(20938): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
E/AndroidRuntime(20938): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
E/MQSEventManagerDelegate(20938): failed to get MQSService.
@matejhocevar
Copy link

I'm having the exact same problem. I'm also wondering how this can be solved. Help, please!

@MohamadSobhy
Copy link
Author

I'm having the exact same problem. I'm also wondering how this can be solved. Help, please!

I refactored my project to use facebook_analytics plugin instead of facebook_app_events and everything works as expected.

Try doing the same until resolving this issue by the author.

@jgrandchavin
Copy link

Same issue for me...
And facebook_analytics don't have the new logPurchase method, I will create an issue on flutter_facebook_auth repo

@tangzigang
Copy link

the same problem fo me ...

@crtl
Copy link

crtl commented Sep 28, 2020

I am having the same issue.

@DennisAlund
Copy link
Member

Please use the issue template for "bug report" to provide full context.

@DennisAlund
Copy link
Member

@MohamadSobhy is this still an issue for you, can you provide full context according to the bug report issue template so that we can try and troubleshoot it together

@NaikSoftware
Copy link

Migration on flutter_login_facebook resolved problem for me

@DennisAlund
Copy link
Member

@NaikSoftware could you give me some more information on what you did when you did the "migration" and how that resolved your issue?

@DennisAlund
Copy link
Member

I noticed that there is another "Facebook Login" plugin that seems to be more actively maintained and using a more recent version of the Facebook SDK: https://pub.dev/packages/flutter_facebook_auth

Please don't take this as an encouragement to use that plugin instead. But I'm just putting it into the discussion to see if there is anyone who have better success with compatibility using that one.

@Theunodb
Copy link

I noticed that there is another "Facebook Login" plugin that seems to be more actively maintained and using a more recent version of the Facebook SDK: https://pub.dev/packages/flutter_facebook_auth

Please don't take this as an encouragement to use that plugin instead. But I'm just putting it into the discussion to see if there is anyone who have better success with compatibility using that one.

I'm using the package mentioned above, cant run pod install:

[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
  In Podfile:
    facebook_app_events (from `.symlinks/plugins/facebook_app_events/ios`) was resolved to 0.0.1, which depends on
      FBSDKCoreKit (~> 8.1.0)

    flutter_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`) was resolved to 1.0.0, which depends on
      FBSDKCoreKit (~> 8.2.0)

@bradsb
Copy link

bradsb commented Dec 2, 2020

I noticed that there is another "Facebook Login" plugin that seems to be more actively maintained and using a more recent version of the Facebook SDK: https://pub.dev/packages/flutter_facebook_auth
Please don't take this as an encouragement to use that plugin instead. But I'm just putting it into the discussion to see if there is anyone who have better success with compatibility using that one.

I'm using the package mentioned above, cant run pod install:

[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
  In Podfile:
    facebook_app_events (from `.symlinks/plugins/facebook_app_events/ios`) was resolved to 0.0.1, which depends on
      FBSDKCoreKit (~> 8.1.0)

    flutter_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`) was resolved to 1.0.0, which depends on
      FBSDKCoreKit (~> 8.2.0)

I'm also having this issue. There is a bug on iOS when using FBSDKCoreKit 8.1.0, so it needed to be updated to 8.2.0 in flutter_facebook_auth I guess.

@DennisAlund Do you think we could get a bump to 8.2.0?

@lukasloh
Copy link
Contributor

lukasloh commented Dec 2, 2020

I'm having the same issue with FBSDKCoreKit 8.1.0 on iOS. I've created a PR for the bump to 8.2.0 (#65).

@DennisAlund
Copy link
Member

PR #65 has been merged to develop and released in v0.8.2

@haneensaadeh1994
Copy link

the issue still exist in version 0.8.2 !!

@tim-teacher
Copy link

tim-teacher commented Apr 29, 2021

@DennisAlund Why it is closed?, issues is still here.
``` facebook_app_events (from .symlinks/plugins/facebook_app_events/ios) was resolved to 0.0.1, which depends on
FBSDKCoreKit (~> 9.0.0)

flutter_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`) was resolved to 2.0.0, which depends on
  FBSDKCoreKit (~> 9.1.0)

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

No branches or pull requests