-
Notifications
You must be signed in to change notification settings - Fork 247
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 #747
Comments
Hey Shivam, Are you using dependency in pub spec or using the whole package as custom dependancy. |
name: total_vision environment: dependencies: dev_dependencies: flutter_icons: flutter: |
@androidshivam Was there a previously authenticated user on this device, and the refresh token expired? |
I've tested on multiple devices.I'm facing this issue on first install as well |
@androidshivam are you still facing this issue? |
@androidshivam - is the confusion that |
@androidshivam - did you try the workaround provided by @dnys1 ? |
@androidshivam - If you are still facing this issue after trying the solution above, please let us know. Otherwise we will close it out. Thanks. |
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
Device: iPhone 12 & iPhone 12 Pro
iOS Version: 14.6
The text was updated successfully, but these errors were encountered: