Closed androidshivam closed 2 years ago
Hey Shivam,
Are you using dependency in pub spec or using the whole package as custom dependancy.
Hey Shivam,
Are you using dependency in pub spec or using the whole package as custom dependancy.
name: total_vision description: A new Flutter application. publish_to: 'none' version: 1.0.1+1
environment: sdk: ">=2.7.0 <3.0.0"
dependencies: flutter: sdk: flutter provider: ^5.0.0 rx_ble: git: url: git://github.com/IoTReady/plugin-flutter-rx-ble.git ref: master get_it: ^6.0.0 pin_input_text_field: path: ./local_plugins/flutter_pin_text_field shared_preferences: ^2.0.6 package_info: ">=0.4.0+17 <2.0.0" lottie: ^1.0.1 font_awesome_flutter: ^9.0.0 flutter_svg: ^0.21.0+1 country_pickers: ^2.0.0 flutter_datetime_picker: ^1.3.8 date_format: ^2.0.2 progressive_image: ^1.0.1 equatable: ^2.0.0 bloc: ^7.0.0 flutter_bloc: ^7.0.0 http: ^0.13.1 image_picker: ^0.7.4 image_cropper: ^1.2.3 flutter_image_compress: ^0.7.0 path_provider: ^2.0.1 amplify_flutter: ^0.2.0 amplify_auth_cognito: ^0.2.0 amplify_api: ^0.2.0 url_launcher: ^6.0.3 permission_handler: ^7.1.0 app_settings: ^4.1.0 share: ^2.0.1 calendarro: path: ./local_plugins/flutter_calendarro
dev_dependencies: flutter_test: sdk: flutter pedantic: ^1.8.0 flutter_launcher_icons: ^0.9.0
flutter_icons: android: false ios: true image_path: "assets/ios_icon.jpg"
flutter: uses-material-design: true assets:
@androidshivam Was there a previously authenticated user on this device, and the refresh token expired?
@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 fetchAuthSession
is throwing an exception instead of returning a value of isSignedIn = false
? Can you add a try/catch block and handle a SessionExpiredException
the same way you'd handle a value of false
for isSignedIn
?
@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)