Skip to content
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

Getting an Error on iPhone 12/ 12 Pro (running on iOS 14.6) #3669

Closed
androidshivam opened this issue Jul 6, 2021 · 4 comments
Closed

Getting an Error on iPhone 12/ 12 Pro (running on iOS 14.6) #3669

androidshivam opened this issue Jul 6, 2021 · 4 comments
Labels
duplicate This issue or pull request already exists mobile client Issues related to AWSMobileClient

Comments

@androidshivam
Copy link

androidshivam commented Jul 6, 2021

Description of bugs: Unhandled Exception: SessionExpiredException(message: Session expired could not fetch user sub, recoverySuggestion: Invoke Auth.signIn to re-authenticate the user, underlyingException: null)

To Reproduce: While installing the app in iOS 12 & 12Pro

Expected Behavior: Initialise the AWS plugins and fetch the current session of user null if User is not signin else gives null

Stack Trace:

[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: SessionExpiredException(message: Session expired could not fetch user sub, recoverySuggestion: Invoke Auth.signIn to re-authenticate the user, underlyingException: null)
#0 AmplifyAuthCognitoMethodChannel.fetchAuthSession (package:amplify_auth_cognito/method_channel_auth_cognito.dart:239:7)

#1 AmplifyAuthCognito.fetchAuthSession (package:amplify_auth_cognito/amplify_auth_cognito.dart:113:17)

#2 CognitoService.isSignedIn (package:total_vision/services/cognito_service.dart:470:21)

#3 CognitoService.configureAmplify (package:total_vision/services/cognito_service.dart:151:20)

Code Snippet:

Future isSignedIn() async {
final session = await Amplify.Auth.fetchAuthSession(
options: CognitoSessionOptions(getAWSCredentials: true));
if(session.isSignedIn){
await getUserData();
await fetchSession();
unawaited(Future.delayed(Duration.zero, locator().queryAll));
}
return session.isSignedIn;
}

Environment(please complete the following information):

SDK Version: 2.2.3
Dependency Manager: CocoaPods version 1.10.1
Xcode Version: Xcode 12.5.1, Build version 12E507
Simulator Screen Shot - iPhone 12 Pro Max - 2021-07-26 at 11 31 25

Device: iPhone 12 & iPhone 12 Pro
iOS Version: 14.6

@diegocstn
Copy link
Contributor

@androidshivam In order to diagnose the issue it'd be helpful for us to have following information:

Describe the bug
A clear and concise description of what the bug is. Please be as detailed as possible and help us help you.

To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Observed Behavior

Expected Behavior
A clear and concise description of what you expected to happen.

Stack Trace
Please provide a stack trace if applicable e.g. a crash is occurring.

Code Snippet
Please provide a snippet of the code causing the issue or how you are using the service that has the bug.

Unique Configuration
If you are reporting an issue with a unique configuration or where configuration can make a difference in code execution (i.e. Cognito) please provide your configuration. Please make sure to obfuscate sensitive information from the configuration before posting.

Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?

Screenshots
If applicable, add screenshots to help explain your problem.

Environment(please complete the following information):

  • SDK Version: [e.g. 2.6.29]
  • Dependency Manager: [e.g. Cocoapods, Carthage]
  • Swift Version : [e.g. 4.0]
  • Xcode Version: [e.g. 11.4]

Device Information (please complete the following information):

  • Device: [e.g. iPhone6, Simulator]
  • iOS Version: [e.g. iOS 11.4]
  • Specific to simulators:

Additional context
Add any other context about the problem here like your specific use case.

@diegocstn diegocstn added mobile client Issues related to AWSMobileClient pending-community-response Issue is pending response from the issue requestor labels Jul 13, 2021
@androidshivam androidshivam changed the title Getting an Error on iPhone 11 (running on iOS 14.6) Getting an Error on iPhone 12/ 12 Pro (running on iOS 14.6) Jul 26, 2021
@royjit
Copy link
Contributor

royjit commented Jul 26, 2021

@androidshivam Are you using Amplify Flutter library?

@androidshivam
Copy link
Author

Yes

@royjit
Copy link
Contributor

royjit commented Jul 28, 2021

Closing this since you already have a Github issue aws-amplify/amplify-flutter#747 with Flutter team

@royjit royjit closed this as completed Jul 28, 2021
@royjit royjit added duplicate This issue or pull request already exists and removed pending-community-response Issue is pending response from the issue requestor labels Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists mobile client Issues related to AWSMobileClient
Projects
None yet
Development

No branches or pull requests

3 participants