Closed dmytrohurskyi closed 2 years ago
Did you install the App onto these problematic devices previously, and signed in a user, and then deleted App without signing out?
@dmytrohurskyi Sorry you've been experiencing this issue. I've been trying to reproduce it on my own device (iPhone 12, iOS 14.8.1) and have not. I'm now upgrading to 15.5 to retry. Just to help make sure I'm completing the repro steps correctly, please clarify one thing: When you say "Install a newer build of this app and start it", do you mean simply re-running flutter run --release
again, or are you distributing an .ipa
to the device?
Did you install the App onto these problematic devices previously, and signed in a user, and then deleted App without signing out?
@HuiSF Yeah, exactly
@dmytrohurskyi - Have you installed the same app on these devices with multiple amplify/Cognito configurations?
@dmytrohurskyi Sorry you've been experiencing this issue. I've been trying to reproduce it on my own device (iPhone 12, iOS 14.8.1) and have not. I'm now upgrading to 15.5 to retry. Just to help make sure I'm completing the repro steps correctly, please clarify one thing: When you say "Install a newer build of this app and start it", do you mean simply re-running
flutter run --release
again, or are you distributing an.ipa
to the device?
@haverchuck re-running with "flutter run --release" should be enough
@dmytrohurskyi Ok thanks - I am still unable to reproduce this issue. I will keep trying though.
@dmytrohurskyi a) Are you using Hosted UI along with the regular Auth APIs? If you are using Hosted UI, how did the affected users signIn? b) Are you seeing any exceptions on a signOut (you can try running the application via XCode for additional logs). c) Can you share a code snippet of how/where you are calling signOut?
I'm facing the same exact issue
Also Amplify.Auth.getCurrentUser()
does not return a valid user but it throws There is already a user which is signed in
. How I can still signOut the user?
I'm trying to call signOut()
before every signIn()
to avoid conflicts. But that's not the optimal way
@durannumit Did you solve this issue? I tried to call signOut()
before every signIn()
but I sometimes got the failed to sign out
but when called signIn()
I got There is already a user which is signed in. Please log out the user before calling showSignIn
If you are still facing this issue can you please open a new issue and fill out the issue in the issue template? Thanks.
Description
There is a strange issue with sign in behaviour on iOS devices. I get this auth exception InvalidStateException with a message "There is already a user which is signed in. Please log out the user before calling showSignIn" every time I try to sign in a user on a few particular iOS devices. I have tested it on several iPhones, but it happens only on two of them. Both have iOS 15.5 installed. I've investigated the other open/closed GitHub issues on this exception and tried to add SignOut before every login. It does not help in this case. Issue appears even after reinstalling an application.
Categories
Steps to Reproduce
Actually, I can't reproduce it on my other devices. But these are the steps that I have made when it first appeared:
Screenshots
No response
Platforms
Android Device/Emulator API Level
No response
Environment
Dependencies
Device
iPhone 11 Pro Max, iPhone SE (1st generation)
OS
iOS 15.5
CLI Version
9.1.0
Additional Context
No response