-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Auth.signIn() promise takes more than 30 seconds to resolve on Android #5539
Comments
@jfaq89 I see that you're testing with a development React Native build. Could you also test with a production build on a physical device and verify that you're seeing the same behavior? Also, what version of |
Hi. We already saw the error in production. Many people from my team have tested using different physical devices and everyone managed to reproduce the error. We tested using the latest version of AWS-amplify. |
We're still blocked. The error was seen using version 3.0.9 Any idea how we can fix this? |
@jfaq89 A couple of questions/comments:
I've got a simple auth app for testing, but I haven't been able to duplicate the issue you're seeing after trying numerous times on an Android device. |
It is not very easy to reproduce the error. You have to try a few times. It is easier to reproduce on a physical device than on a simulator. Thanks in advance. Looking forward to hear from you! |
New information : we managed to reproduce it on an iPhone device. The Auth.signIn promise lasted 31 seconds. So it is also possible to see in an iPhone, but much harder to reproduce the error. |
Anyone has any ideas? If we cannot solve it, then is there maybe a possible workaround? |
Unfortunately we have had no luck trying to reproduce this issue on our end using multiple devices/simulators/emulators. However, we can still leave this issue open in case others might be experiencing it as well in the future. |
one of my beta tester is facing this issue but worse. I will be able to to more test in debug mode with this phone Friday. Don't know exactly what to look Edit : I test to call the login in a thunk redux, in saga, or alone. Using promise or async. The result is the same. It is taking more than 10 minutes; Reactotron does not see any outgoing network request and I got no error in android studio log |
I am experiencing the same issue, but with ionic+angular on android devices. The tester is reporting a long wait time for sign in, and it seems to me that amplify is calling the cognito server about 12 times for a single Auth.signin, and the accumulated time of all these requests took this long. I am suspecting this is both related to network and the implementation of the frontend code. |
When I wrote my previous message, I was getting amplify by package in react native I switch to using aws-amplify full package (with latest version) and the issue seems to have disappear. (in release mode) |
Experiencing the same issue with latest expo and even clean RN. The call to SignIn can is steady at 40-60s on a clean app that just does |
@standemchuk If you could provide a sample repo that consistently shows this behavior, that would be wonderful! So far, I've been unable to reproduce the issue described. |
@amhinson Hi and thanks for a quick reaction! |
@amhinson sorry, just pushed a small updated to make sure the app launches, please pull the latest changes |
@amhinson were you able to reproduce the issue? |
@amhinson the issue can be reproduced on android emulator and android phone only. No issues if testing in the browser (had rare issues in iOS though). |
@standemchuk So far I have not been able to replicate it. Would you be able to share the steps you took after running |
@amhinson, according to the docs we don't have to create authentication service from scratch by running I am able to reproduce the issue now with the codebase we provide (please also see screenshots below). Sometimes we got the response within 0.5s (which is okay), but usually, it is 10 seconds or worse (81s in the second example). |
Are you using any custom Lambda triggers, by chance? |
@amhinson, yes we have custom triggers. So for the sake of experiment, I've just created a new Cognito UserPool with no custom triggers. |
@rbrazhnyk Would you be able to reach out to me on our Discord? I'm still not able to reproduce the issue, but it could be helpful for me to test directly against your new User Pool. |
@amhinson what is your username in Discord? P.S. I find out how that works. I've sent you a friend request. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I was having this issue after developing out my web version for a while and started testing on my mobile builds. I found my android build was working and navigating fine but amplify's |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm not sure if it's exactly the same as this issue, but I experienced extremely slow And somehow I fixed it, so I'll leave some workaround that might be worth trying.
In my case, got rid of |
Was causing issues for me as well - I added |
Hi Everyone, I am having the same issue with an app created as follows: > What version of React and Amplify are you using? |
It appears that this may be some sort of React Native issue with IPv6 on Android. I've applied the workaround in: facebook/react-native#29608 (comment) and now requests seem to go through. That entire thread is about requests getting stuck on Android. Here's the second log line being logged correctly with the IPv4 DNS resolver from the link: |
Opened facebook/react-native#32730 for react-native. I left a more detailed write-up here: facebook/react-native#32730 (comment) |
any suggestions here. I'm getting same problem. There is no issue with ios device but in android when I call the auth.signIn application got stuck and fps drops to -2 |
I'm facing the same issue. The sign in call was working perfectly fine until recently, now takes up to a minute or two. |
is there solution for this? i have 2 application with one aws source code, on one works prefect and on the other the app stuck for 10 sec |
I am also running into this issue on a new app, it worked instantaneously for a bit and now hangs as described above. |
@HodayaGruz @Sean-Kurian Did you find any solution? |
@JKKholmatov In my case, I was need to create new app and copy all the code (I guess the problem was relevant to react native version) |
With the release of the latest major version of Amplify (aws-amplify@>6), we believe this issue should now be resolved. Since we could not reproduce this issue on our side, would anyone be able to confirm after migrating to v6 if this is still an issue? Please refer to our release announcement, migration guide, and documentation for more information. |
We'll close this issue on our side as it seems to be awaiting fixes on Facebook's React Native repo as detailed in #32730 on their repo. If someone has an easy way to reproduce this on the Amplify JS library side, please feel free to respond with those details and we can reopen this issue. |
Describe the bug
Auth.signIn() promise can take more than 30 seconds to resolve on Android. On iOS and Web we could not reproduce the bug.
It happens when we start the app and we click "Login" for the first time. It doesn't always happen, we have to try a few times to reproduce it.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should always be complete under 3 seconds as it happens on the other platforms.
Code Snippet
App.tsx :
Screenshots
Here for example, it lasted 128 seconds to login!
What is Configured?
If applicable, please provide what is configured for Amplify CLI:
aws-exports
file:};
};
The text was updated successfully, but these errors were encountered: