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

Error while getting the getCurrentUser if mobile is connected to network without internet #2292

Closed
2 of 13 tasks
raphire08 opened this issue Oct 28, 2022 · 2 comments
Closed
2 of 13 tasks
Assignees
Labels
auth Issues related to the Auth Category bug Something is not working; the issue has reproducible steps and has been reproduced fixed-in-release-candidate Issues that have been addressed in the current release-candidate branch

Comments

@raphire08
Copy link

Description

We are trying to call Amplify.Auth.getCurrentUser(), it works most of the times, but sometimes this is giving error. Below are the error details

UnknownException(message: Unexpected error occurred with message: An unknown error occurred, recoverySuggestion: This should not happen. There is a possibility that there is a bug if this error persists. Please take a look at https://github.com/aws-amplify/amplify-ios/issues to see if there are any existing issues that match your scenario, and file an issue with the details of the bug if there isn't. Issue encountered at:
file: /Volumes/Work/fdg_app/ios/Pods/Amplify/Amplify/Categories/Auth/Error/AuthError.swift
function: recoverySuggestion
line: 80, underlyingException: The Internet connection appears to be offline.)

We noticed that this is happening when mobile is connected to wifi but has no internet.

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Storage

Steps to Reproduce

  1. Keep mobile connected to network without internet
  2. Call Amplify.Auth.getCurrentUser()

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Android Device/Emulator API Level

No response

Environment

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.5, on macOS 12.4 21F79 darwin-x64, locale
    en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version
    33.0.0-rc4)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.72.0)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

Dependencies

dependencies:
- amplify_api 0.6.2 [amplify_api_android amplify_api_ios amplify_core amplify_flutter aws_common collection flutter meta plugin_platform_interface]
- amplify_auth_cognito 0.6.2 [amplify_auth_cognito_android amplify_auth_cognito_ios amplify_core aws_common collection flutter meta plugin_platform_interface]
- amplify_flutter 0.6.2 [amplify_core amplify_datastore_plugin_interface amplify_flutter_android amplify_flutter_ios aws_common collection flutter meta plugin_platform_interface]
- async 2.8.2 [collection meta]
- auto_size_text 3.0.0 [flutter]
- camera 0.9.8+1 [camera_android camera_avfoundation camera_platform_interface camera_web flutter flutter_plugin_android_lifecycle quiver]
- characters 1.2.0
- charts_flutter 0.12.0 [charts_common collection flutter intl logging meta]
- collection 1.15.0
- connectivity_plus 2.3.6 [flutter connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows]
- cupertino_icons 1.0.5
- device_info_plus 4.0.0 [flutter device_info_plus_platform_interface device_info_plus_macos device_info_plus_linux device_info_plus_web device_info_plus_windows]
- dotted_border 2.0.0+2 [flutter path_drawing]
- easy_mask 2.0.1 [flutter]
- email_validator 2.0.1
- f_logs 2.0.1 [flutter sembast path_provider intl xxtea meta path stack_trace]
- fdg_formula_engine_test 0.0.0 [path intl expression_language]
- firebase_core 1.20.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 2.8.5 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_messaging 12.0.1 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta typed_data vector_math sky_engine]
- flutter_image_compress 1.1.0 [flutter]
- flutter_inapp_notifications 0.0.3 [flutter]
- flutter_keyboard_visibility 5.3.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_web flutter]
- flutter_local_notifications 9.5.3+1 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone]
- flutter_slidable 0.6.0 [flutter]
- flutter_smartlook 3.0.10 [flutter]
- flutter_svg 1.0.3 [flutter meta path_drawing vector_math xml]
- flutter_switch 0.3.2 [flutter]
- geolocator 8.2.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows]
- google_fonts 3.0.1 [flutter http path_provider crypto]
- google_mlkit_text_recognition 0.4.0 [flutter google_mlkit_commons]
- hypertrack_plugin 0.4.2 [flutter plugin_platform_interface]
- image_cropper 2.0.3 [flutter image_cropper_platform_interface image_cropper_for_web]
- image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface]
- in_app_notification 1.1.2 [flutter]
- intl 0.17.0 [clock path]
- isolate_handler 1.0.1 [flutter flutter_isolate]
- json_annotation 4.6.0 [meta]
- jwt_decoder 2.0.1
- keyboard_actions 3.4.7 [flutter]
- linked_scroll_controller 0.2.0 [flutter]
- local_auth 2.1.0 [flutter intl local_auth_android local_auth_ios local_auth_platform_interface local_auth_windows]
- numeric_keyboard 1.1.0 [flutter]
- objectbox 1.6.0 [collection flat_buffers ffi meta path]
- objectbox_flutter_libs 1.6.0 [objectbox path_provider]
- package_info_plus 1.4.2 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web]
- path 1.8.0
- path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- path_provider_android 2.0.14 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.11 [flutter path_provider_platform_interface]
- pendo_sdk 2.16.0 [flutter]
- permission_handler 9.2.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface]
- petitparser 4.4.0 [meta]
- rxdart 0.27.5
- scanbot_sdk 2.9.0 [logging json_annotation flutter]
- shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- sprintf 6.0.2
- string_validator 0.3.0
- syncfusion_flutter_datepicker 19.4.56 [flutter intl syncfusion_flutter_core]
- url_launcher 6.1.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- uuid 3.0.6 [crypto]
- visibility_detector 0.3.2 [flutter]

transitive dependencies:
- amplify_api_android 0.6.2 [flutter]
- amplify_api_ios 0.6.2 [amplify_core flutter]
- amplify_auth_cognito_android 0.6.2 [flutter]
- amplify_auth_cognito_ios 0.6.2 [amplify_core flutter]
- amplify_core 0.6.2 [aws_common collection flutter intl json_annotation meta plugin_platform_interface uuid]
- amplify_datastore_plugin_interface 0.6.2 [amplify_core collection flutter meta]
- amplify_flutter_android 0.6.2 [flutter]
- amplify_flutter_ios 0.6.2 [amplify_core flutter]
- args 2.3.1
- aws_common 0.1.1 [async collection http meta stream_transform uuid]
- boolean_selector 2.1.0 [source_span string_scanner]
- camera_android 0.9.8+3 [camera_platform_interface flutter flutter_plugin_android_lifecycle stream_transform]
- camera_avfoundation 0.9.8+2 [camera_platform_interface flutter stream_transform]
- camera_platform_interface 2.2.0 [cross_file flutter plugin_platform_interface stream_transform]
- camera_web 0.2.1+6 [camera_platform_interface flutter flutter_web_plugins stream_transform]
- charcode 1.3.1
- charts_common 0.12.0 [collection intl logging meta vector_math]
- clock 1.1.0
- connectivity_plus_linux 1.3.1 [flutter connectivity_plus_platform_interface meta nm]
- connectivity_plus_macos 1.2.4 [connectivity_plus_platform_interface flutter]
- connectivity_plus_platform_interface 1.2.1 [flutter meta plugin_platform_interface]
- connectivity_plus_web 1.2.3 [connectivity_plus_platform_interface flutter_web_plugins flutter]
- connectivity_plus_windows 1.2.2 [connectivity_plus_platform_interface flutter]
- cross_file 0.3.3+1 [js meta]
- crypto 3.0.2 [typed_data]
- dbus 0.7.3 [args ffi meta xml]
- device_info_plus_linux 2.1.1 [device_info_plus_platform_interface file flutter meta]
- device_info_plus_macos 2.2.3 [device_info_plus_platform_interface flutter]
- device_info_plus_platform_interface 2.3.0+1 [flutter meta plugin_platform_interface]
- device_info_plus_web 2.1.0 [device_info_plus_platform_interface flutter_web_plugins flutter]
- device_info_plus_windows 2.1.1 [device_info_plus_platform_interface ffi flutter win32]
- expression_language 1.0.0 [petitparser rational]
- fake_async 1.2.0 [clock collection]
- ffi 1.2.1
- file 6.1.2 [meta path]
- firebase_core_platform_interface 4.5.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 1.7.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.2.11 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_platform_interface 4.1.0 [firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 3.1.0 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- flat_buffers 2.0.5
- flutter_isolate 2.0.2 [flutter uuid]
- flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface]
- flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter]
- flutter_local_notifications_linux 0.4.2 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories]
- flutter_local_notifications_platform_interface 5.0.0 [flutter plugin_platform_interface]
- flutter_plugin_android_lifecycle 2.0.7 [flutter]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph typed_data]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta typed_data vector_math]
- geolocator_android 3.1.8 [flutter geolocator_platform_interface]
- geolocator_apple 2.2.1 [flutter geolocator_platform_interface]
- geolocator_platform_interface 4.0.6 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 2.1.6 [flutter flutter_web_plugins geolocator_platform_interface]
- geolocator_windows 0.1.1 [flutter geolocator_platform_interface]
- google_mlkit_commons 0.2.0 [flutter]
- http 0.13.4 [async http_parser meta path]
- http_parser 4.0.1 [collection source_span string_scanner typed_data]
- image_cropper_for_web 0.0.4 [flutter flutter_web_plugins image_cropper_platform_interface js]
- image_cropper_platform_interface 2.0.0 [flutter plugin_platform_interface http]
- image_picker_android 0.8.5+1 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface]
- image_picker_ios 0.8.5+6 [flutter image_picker_platform_interface]
- image_picker_platform_interface 2.5.0 [cross_file flutter http plugin_platform_interface]
- js 0.6.3
- local_auth_android 1.0.6 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface]
- local_auth_ios 1.0.7 [flutter intl local_auth_platform_interface]
- local_auth_platform_interface 1.0.4 [flutter intl plugin_platform_interface]
- local_auth_windows 1.0.1 [flutter local_auth_platform_interface]
- logging 1.0.2
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.3
- meta 1.7.0
- nm 0.5.0 [dbus]
- package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path]
- package_info_plus_macos 1.3.0 [flutter]
- package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface]
- package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface]
- package_info_plus_windows 1.0.5 [package_info_plus_platform_interface ffi flutter win32]
- path_drawing 1.0.0 [vector_math meta path_parsing flutter]
- path_parsing 1.0.0 [vector_math meta]
- path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface]
- path_provider_windows 2.0.7 [ffi flutter path path_provider_platform_interface win32]
- permission_handler_android 9.0.2+1 [flutter permission_handler_platform_interface]
- permission_handler_apple 9.0.4 [flutter permission_handler_platform_interface]
- permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface]
- permission_handler_windows 0.1.0 [flutter permission_handler_platform_interface]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- process 4.2.4 [file path platform]
- quiver 3.1.0 [matcher]
- rational 1.2.1
- sembast 3.2.0+1 [meta path synchronized]
- shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.0.0 [flutter]
- shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- sky_engine 0.0.99
- source_span 1.8.1 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.0
- string_scanner 1.1.0 [charcode source_span]
- syncfusion_flutter_core 19.4.56 [vector_math flutter]
- synchronized 3.0.0+2
- term_glyph 1.2.0
- test_api 0.4.8 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timezone 0.8.0 [path]
- typed_data 1.3.0 [collection]
- url_launcher_android 6.0.18 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface]

Device

iPhone XR

OS

iOS 16

Deployment Method

Custom Pipeline

CLI Version

No response

Additional Context

No response

Amplify Config

{
"UserAgent": "aws-amplify-cli/2.0",
"Version": "1.0",
"auth": {
"plugins": {
"awsCognitoAuthPlugin": {
"UserAgent": "aws-amplify/cli",
"Version": "0.1.0",
"IdentityManager": {
"Default": {}
},
"CognitoUserPool": {
"Default": {
"PoolId": "XXX",
"AppClientId": "XXX",
"AppClientSecret": "XXX",
"Region": "XXX"
}
},
"Auth": {
"Default": {
"authenticationFlowType": "XXX"
}
}
}
}
},
"api": {
"plugins": {
"awsAPIPlugin": {
"joyn-fdg-stage": {
"endpointType": "GraphQL",
"endpoint": "XXX",
"region": "XXX",
"authorizationType": "XXX"
},
"joyn2_AppSync_stageai": {
"endpointType": "GraphQL",
"endpoint": "XXX",
"region": "XXX",
"authorizationType": "XXX"
}
}
}
}
}

@dnys1
Copy link
Contributor

dnys1 commented Oct 28, 2022

Hi @raphire08 - sorry you are facing this issue and thank you for the detailed report.

I agree that this appears to be a bug. At the moment, we are not making any changes to the v0.x Auth libraries, but this issue has been resolved in our developer preview release v1.0.0-0. I understand if you're not able to use this at the moment and can leave this issue open until that release becomes stable.

@dnys1 dnys1 self-assigned this Oct 28, 2022
@dnys1 dnys1 added bug Something is not working; the issue has reproducible steps and has been reproduced auth Issues related to the Auth Category pending-release Issues that have been addressed in main but have not been released labels Oct 28, 2022
@Jordan-Nelson Jordan-Nelson added fixed-in-release-candidate Issues that have been addressed in the current release-candidate branch and removed pending-release Issues that have been addressed in main but have not been released labels Mar 2, 2023
@Jordan-Nelson
Copy link
Member

This issue has been addressed in v1.0.0 of Amplify Flutter, which is now stable. This release also includes web and desktop support for Auth, API, Analytics, and Storage. You can see the list of new features and bug fixes in the release notes, and see more details on how to migrate in the upgrade guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues related to the Auth Category bug Something is not working; the issue has reproducible steps and has been reproduced fixed-in-release-candidate Issues that have been addressed in the current release-candidate branch
Projects
None yet
Development

No branches or pull requests

3 participants