Nubescope / react-native-facebook-account-kit

Facebook Account Kit SDK wrapper for React Native
320 stars 120 forks source link

Android Background #114

Open VincentRoest opened 6 years ago

VincentRoest commented 6 years ago

Issue Description

The user opens the accountkit modal on Android, fills out a phone number and backgrounds the app. The modal disappears from view, and the user cannot complete the login-process. I believe this is due to the fact that the intent is null (as mentioned in #61 by @tszajna0). The fix was to reject the promise and return. However, this means that the login flow breaks. A solution would be to find out why this intent is null, or find a way to let the dialog not be dismissed. Maybe we need to update the android part of this module to re-fit with the official Facebook AccountKit Android SDK?

I tried running the "official" example project on https://github.com/fbsamples/account-kit-samples-for-android, and here the login dialog does not disappear after pressing the home button. Comparing this file with https://github.com/fbsamples/account-kit-samples-for-android/blob/master/samples/AccountKitSimpleSample/src/main/java/com/example/accountkitsimplesample/MainActivity.java,I noticed that the onActivityResult functions are quite similar, so I doubt whether the problems arise there. I do get one cryptic error when I for instance not background the app, but press the back button to return to my app, namely: { [Error: 0] framesToPop: 1, code: 'error' }.

Might relate to #90

Steps to Reproduce / Code Snippets

Running the sample code

Expected Results

The dialog is not dismissed when going to background, just as in the official Facebook account kit android sample.

Additional Information

issue

RossKinsella commented 6 years ago

I've been getting an intent of null when calling AccountKit.loginWithPhone() on Android 4.4 (19)

zachrnolan commented 6 years ago

I'm also experiencing this on Android.

  1. Enter phone number in AccountKit
  2. Background the app to get to the text message app
  3. Re-open app
  4. AccountKit is showing the "Enter your mobile number" screen again.

There are a few ways that users are currently able to get past this:

  1. See the text notification while in the app and enter it quickly
  2. If they have automatic verification through android

If none of the above ways are done, a user will get stuck in an endless loop of trying to get the code to enter it. This seems like a pretty significant issue.

RN 0.54.1 react-native-facebook-account-kit 0.8.0 Testing on a Samsung Galaxy S7 (Android 7.0)

vwalletviettel commented 6 years ago

It only occurred once, after kill or shut down this App, this bug will disappear. Anyone has solution for this case?

ducpt2 commented 6 years ago

+1 for the issue. I am facing the same problem.

jpgarcia commented 5 years ago

Guys, can you try with the latest version?