Skip to content

Fix issues found by round of manual test #383

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

Merged
merged 6 commits into from
Nov 1, 2016

Conversation

amandle
Copy link
Contributor

@amandle amandle commented Oct 28, 2016

This solves the following problems:

  • Tapping login with Facebook crashes with Chrome custom tab. I tracked this down to the Facebook SDK not playing nicely with the support library version 25.0.0. To solve this I upgraded the Facebook SDK and down graded the support library.
  • Starting the register email flow on older devices crashed the app. This was a problem with trying to unparcel things that weren't there.
  • On low memory devices Facebook login with a chrome custom tab would occasionally do nothing. This was because the activity was being destroyed, taking the callback manager with it.

@amandle
Copy link
Contributor Author

amandle commented Oct 29, 2016

I noticed that master has support library 25.0.0 and tested this issue with the code on master. Master currently has the same issue:

java.lang.NoSuchMethodError: No static method startActivity(Landroid/app/Activity;Landroid/content/Intent;Landroid/os/Bundle;)V in class Landroid/support/v4/app/ActivityCompat; or its super classes (declaration of 'android.support.v4.app.ActivityCompat' appears in /data/app/com.firebase.uidemo-2/base.apk)
                                                                     at android.support.customtabs.CustomTabsIntent.launchUrl(CustomTabsIntent.java:200)
                                                                     at com.facebook.internal.CustomTab.openCustomTab(CustomTab.java:47)
                                                                     at com.facebook.login.CustomTabLoginMethodHandler.tryAuthorize(CustomTabLoginMethodHandler.java:92)
                                                                     at com.facebook.login.LoginClient.tryCurrentHandler(LoginClient.java:258)
                                                                     at com.facebook.login.LoginClient.tryNextHandler(LoginClient.java:220)
                                                                     at com.facebook.login.LoginClient.authorize(LoginClient.java:128)
                                                                     at com.facebook.login.LoginClient.startOrContinueAuth(LoginClient.java:109)
                                                                     at com.facebook.login.LoginFragment.onResume(LoginFragment.java:176)
                                                                     at android.support.v4.app.Fragment.performResume(Fragment.java:2133)
                                                                     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1156)
                                                                     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1295)
                                                                     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1277)
                                                                     at android.support.v4.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:2164)
                                                                     at android.support.v4.app.FragmentController.dispatchResume(FragmentController.java:223)
                                                                     at android.support.v4.app.FragmentActivity.onResumeFragments(FragmentActivity.java:509)
                                                                     at android.support.v4.app.FragmentActivity.onPostResume(FragmentActivity.java:498)
                                                                     at android.app.Activity.performResume(Activity.java:6807)
                                                                     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3406)
                                                                     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3469)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2732)
                                                                     at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:154)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:6119)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

@SUPERCILEX
Copy link
Collaborator

@amandle are you sure? I can't reproduce this issue on my 6P. Have you tried another device? (I only have my api 25 6P so I'm a bit unhelpful regarding testing on different devices and api levels.)

Copy link
Contributor

@samtstern samtstern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me, have you seen other reports online of the Facebook SDK having this incompatibility?

@@ -46,14 +46,12 @@
private static final String TAG = "FacebookProvider";
private static final String EMAIL = "email";
private static final String PUBLIC_PROFILE = "public_profile";
private static final CallbackManager mCallbackManager = CallbackManager.Factory.create();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if it's static, call it sCallbackManager

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I haven't found other reports of this incompatibility online unfortunately. There seems to be little information about Facebook's Chrome Custom Tabs in general.

@amandle
Copy link
Contributor Author

amandle commented Nov 1, 2016

@SUPERCILEX I'm as sure as I can be 😄 The error only appears one out of three attempts, but doesn't appear at all with this change. Our manual testers also encountered this error on their test devices

@amandle amandle merged commit cce75a8 into firebase:version-1.0.0-dev Nov 1, 2016
@SUPERCILEX
Copy link
Collaborator

@amandle sounds good!

@directionyu
Copy link

directionyu commented Dec 5, 2016

i've encountered this problem, it looks like not compatible with support library version 25.0.0 , i've upgraded the Facebook SDK version 4.17.0 and solved the this problem

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

Successfully merging this pull request may close these issues.

4 participants