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
Not able to get any exceptions in iOS #1857
Comments
Hello @Sunsiha Thanks for reporting this issue.
Can you elaborate on this one a bit more?
|
Hello @HuiSF ,
When I click on sign in button am calling the following API;
This am not getting any response or AmplifyException also.
Signout also not throwing any error. In my code base it's like the same flow only.
|
Do you mean Do sign in and sign out still work in the old version? |
@HuiSF No it's not working. I tried. Such a weird issue. Do sign in and sign out still work in the old version? |
Sorry the information you provided so far doesn't really help me to help you triaging this issue.
|
|
@HuiSF May b chances are there with like this. Scenario:
Note: After uninstall also the cognito user details may b not clearing. |
Uninstall App won't clear credentials that are stored in device keychain. If the App bundle id remains the same, it looks up the existing credentials. This could be a cause. But I need to confirm if anything can cause a silent exception in this scenario. Can you try to clear the keychain in the testing device see if you can get around of this? |
Actually I have changed the end points(Staging to QA) then it worked. Can you try to clear the keychain in the testing device see if you can get around of this? This I will again do one more upload with opposite like QA to Staging. Then will confirm you. Will clear the keychain also if i get the issue means. But I feel this will be the cause. Just do confirm about a silent exception in this case. |
Yes this is the case. |
I tested this scenario -
It looks like this part is working correctly. |
Yes. This I also used to get. But only when it is like TestFlight/appstore build am not getting any exception. And the scenario which I mentioned. |
Hi @Sunsiha I tested again with release build today on a physical device. Test 1:
Test 2
So everything seems working correctly from my testing. The business logic should remain the same regardless build modes, or how to install the App. Could you double check the set up on your side? |
This is happening when I install from TestFlight or Appstore. Test 1:
And once we do this scenario when we try to do normal debug build I was not able to login. Unless I change to first userpool 1 config. |
@HuiSF am really not able to find why it is happening. Am getting only some user id when i try to call getuser() API. But when am trying to check that username in cognito userpool am not able to see that user id only. And in other device it's showing some other userid which is present in userpool also. |
@Sunsiha - Can you please provide the info in the bug report template? I am particularly interested in what version of Amplify-flutter you are using, but having all the info from that template could help in reproducing this issue. Can you also provide the contents of your ios/Podfile.lock file? |
Thanks @Sunsiha. Can you also share the contents of your ios/Podfile.lock? As I mentioned on the other issue, there was a known issue in Amplify-ios (which amplify-flutter depends on) where some data would not be cleared when the user pool was switched, causing an issue as you describe. I want to confirm which version of amplify-ios is being used in your project, which will be listed in your Podfile.lock. |
|
@Sunsiha - Thank you for providing that. The issue you are experiencing was fixed in AWSMobileClient (aka aws-sdk-ios) in v2.27.2 (see bug fixes in the release notes: https://github.com/aws-amplify/aws-sdk-ios/releases/tag/2.27.2). Amplify-flutter depends on amplify-ios, and amplify-ios depends on aws-sdk-ios. Your project seems to have a direct dependency on v2.27.10 of AWSMobileClient
With this fix, all credentials should be cleared on startup if the user pool changes. Edit: See correction below. I will attempt to reproduce this issue with those versions. |
Apologies for the confusion - I misread the output. The listing for the transitive dependency should not matter here. The actual dependency listing of v2.27.10 should be all that matters. That version should have the fix. I will attempt to reproduce that with those versions. |
@Sunsiha - I would like to clarify one thing about the versions you are using to make sure that I am attempting to reproduce this with the exact versions you are using. In the other issue your dependencies included amplify_flutter v0.6.1. amplify_flutter v0.6.1 depends on amplify-ios v1.23.0. I can see from your podfile.lock though that you have a dependency on amplify-ios v1.25.0. The version was bumped in amplify_flutter v0.6.2 to 1.25.0. Can you confirm you are still depending on amplify_flutter 0.6.1? You can look for You should see an entry like:
|
Can you also confirm that you are able to reproduce this locally by making no other changes other than the user pool config? I know you mentioned versions uploaded to the App Store and Test Flight. I want to first confirm we can repro this locally since it will be harder to confirm the version in those versions. If we can first figure out how to repro this locally, we can then try to figure out what version those are using. |
Can you also share your amplify config (with sensitive info removed)? This might be specific to certain sign up mechanism. So far I have been unable to repro this with username based sign in. |
|
Like when I started the application for development i was using this version,
then the release i done with
Then when I got the issue I upgraded with
But for testing we all used all these versions too. |
The version of the app shipped with amplify-flutter 0.2.10 will not have the fix from the iOS SDK. The version using 0.4.1 likely does not have the fix from the iOS SDK either, although it is possible that it does. The version of the app you have locally does have the fix. I know this because the version of Amplify-Flutter currently requires AWSMobileClient version 2.27.0 or higher (up to, but not including 2.28.0). If you have a version listed in your podfile.lock which meets that, it will be used. This unfortunately could include v2.27.0 or v2.27.1, which would not have the fix. The version you have in your podfile.lock now is higher than 2.27.2 so you should not see this issue in subsequent builds (assuming this is committed to source control, which it should be). However, if you are testing with a build that doesn't have this fix, you will experience an issue when switching user pools. I think it is likely that this issue is only surfacing for your team when they switch to a build that does not have the fix. To help prevent this you can log out prior to switch app versions (if you are switching user pools you will have to re-authenticate anyway). If this is being seen on a simulator, you can go to Device -> Erase all Content and Settings, which will clear the keychain for the device. |
It's in real device. Any other solution i can do? Like we can clear keystore values or something before trying to login? since we can't go n tell each user to logout and all right? |
@Sunsiha - have all the users that are experiencing this used the app with multiple user pools? If they have not used versions of the app with different user pools, than any issue they are experiencing would be something else. Keychain will be cleared on app launch if the user pool has changed starting with v2.27.2. You could get the testers and/or users experiencing this a version of the app that as AWSMobileClient v2.27.2 or later. Since you have a later version in your Podfile.lock now, any future builds will have a version with the fix. |
This app currently we are using internally. So in that one user facing the same issue. Since he never used any other user pool apart from prod. But he is not able to login. So only in my previous comments I said am not sure is it because of switching user pool. With same user pool am using two applications. And both app the user installed and logged in before, Is there is any link because of that? Sorry @Jordan-Nelson Am also trying to understand the scenarios. |
Data stored in Keychain is only accessible by an app with the same App ID (and developer team) as the app that created that data. So assuming the two apps have different App IDs, no - installing two different apps with two different user pools would not be an issue. If you think there is any chance that this user installed a version of the app with a different user pool, you could have them install a newer version that will have this fix to see if that resolves it, but it sounds like this specific user may be facing a different issue. Are you able to capture any logs from their session when they attempt to login? |
Nop. I have two applications with same userpool app id's. Imagine we have A and B are the applications. A&B are using same user pool. Why two application means we are using both app for different purpose. Like one is client and another one is user. But these things we doesn't have any issues in Android applications. |
@Jordan-Nelson I have uploaded new version again to the Appstore. Still for that user not able to login. |
Do you have any logs from that user? |
The issue for this user doesn't seem specific to switching user pools. |
Nope. Not getting logs as well. |
Just to clarify, do you mean that you have not collected logs from that user, or do you mean that you have collected logs, and there is nothing in the logs when signIn is called? If it is not working I would expect there to be an exception, which might give me a starting for trouble shooting. |
@Jordan-Nelson No logs am getting related with amplify. All are some background assertions. |
Okay. How are you collecting logs? Without reproducible steps or logs, this is going to be really difficult to determine the root cause. Is there anything specific about the device or OS this user is on? In the issue you had listed iPhone 12 and OS 15.5. Is that the device and OS this user is on? |
@Sunsiha - Let me know what logs you are attempting to collect, and how you are collecting them. I would recommend adding some log statements in a catch clause of a try/catch around signIn. That way we can see if there are any exceptions coming from signIn. It sounds like this is happening on a co-workers device. If you are able to debug this on the physical device, that would be ideal. But if not, you will need some way to collect the logs from their device. |
Actually this is one of my colleague device.
|
Try catch have tried.. we are not able to get anything..such a weird .. I will check something and let you know. getting this when am trying with simulator.
|
Just to clarify,
Are you experiencing this same issue on the simulator? |
amplify api's not at all calling. It's not getting any exceptions in try catch also. Am experiencing this same issue on the simulator. |
Can you share the code you are using to sign a user in? Are you still using Amplify version 0.6.1 and do you still have AWSMobileClient v2.27.10 in you Podfile.lock? |
podfile
Sign in code
CognitoRepo
|
@Sunsiha - Apologies for the delay as I missed your last response. Can you run the app on the simulator from Xcode and view the logs during sign in? Logs from the amplify-ios SDK will not show in the flutter console output. |
@Sunsiha - Have you have a chance to run this from Xcode to view the logs? |
Hi @Sunsiha sorry we didn't hear back from you! Please feel free to reopen and follow up if you need further assistance. |
Hey, I think I have a similar issue here. I am trying to integrate Amplify authorisation into my native iOS app. Two-step sign up works well, which points that the configuration should be fine. But I am facing some buggy behaviour during the sign in as well as @Sunsiha did. The try await doesn't resolve at all. I catch no errors, no anything. I have added Amplify 2.4.0 though Xcode packages and did this:
Is there something I am missing here? |
Hi @SolomiyaN, sorry you are facing this issue. For questions related to Amplify Swift, can you fill out a ticket in the https://github.com/aws-amplify/amplify-swift repo? They should be able to better assist you over there. |
I have created an application and uploaded to the TestFlight and Appstore also. First time user was able to login and then for next patch release I have uploaded to the TestFlight. Then am not able to signin only. Tried to catch the exception using toast/alert messages, firebase crashlytics. Then connected to the device which i have already installed the app from Testflight. And i run the application in real device tried to see console error, not able to see the exception again. Then i tried with
fetchAuthSession
didn't get any exception. Am getting only response forI was able to get user id. But for all other cognito api's am not getting any exceptions or not even the response.
Software version 15.5
Model iPhone 12
Note:
The same code base is working for android device and simulator also.
The text was updated successfully, but these errors were encountered: