Open VincentRoest opened 6 years ago
I've been getting an intent of null when calling AccountKit.loginWithPhone()
on Android 4.4 (19)
I'm also experiencing this on Android.
There are a few ways that users are currently able to get past this:
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)
It only occurred once, after kill or shut down this App, this bug will disappear. Anyone has solution for this case?
+1 for the issue. I am facing the same problem.
Guys, can you try with the latest version?
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