firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.71k stars 3.97k forks source link

🐛 [firebase_ui_auth] SignInScreen error messages can be hidden by the in-screen keyboard on some devices #10207

Closed plammens closed 1 year ago

plammens commented 1 year ago

Bug report

Describe the bug In SignInScreen, when the user clicks the Sign In button and some error occurs, since the in-screen keyboard is not removed, the error message appears hidden behind it so it might look to the user that nothing has happened.

(1) Before clicking the sign-in button, (2) after clicking, and (3) after dismissing the keyboard manually:

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a flutter app with a SignInScreen, with an EmailSignInProvider and a GoogleProvider
  2. Open the app on a Nokia 6 or other physical or emulated android device whose display characteristics make the sign-in button appear just above the keyboard, as shown in the screenshots above
  3. Enter some non-existing user data
  4. Without dismissing the keyboard (by clicking elsewhere), click Sign In
  5. Dismiss the keyboard to check that the error message has appeared behind the keyboard

Expected behavior

The error message is highlighted clearly, for example by automatically hiding the keyboard when the user clicks sign in.


Flutter doctor

Click To Expand ``` Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.3.7, on Microsoft Windows [Version 10.0.19044.2364], locale en-GB) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.18) [√] Android Studio (version 2021.2) [√] IntelliJ IDEA Ultimate Edition (version 2021.3) [√] IntelliJ IDEA Ultimate Edition (version 2022.2) [√] Connected device (5 available) [√] HTTP Host Availability • No issues found! ```

Flutter dependencies

Click To Expand ``` Dart SDK 2.18.4 Flutter SDK 3.3.7 commitments_app 1.0.0+1 dependencies: - cloud_firestore 4.3.1 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - collection 1.16.0 - cupertino_icons 1.0.5 - date_time_picker 2.1.0 [flutter intl] - firebase_auth 4.2.4 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.4.1 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_dynamic_links 5.0.11 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_ui_auth 1.1.6 [email_validator firebase_auth firebase_core firebase_dynamic_links firebase_ui_localizations firebase_ui_oauth flutter flutter_localizations flutter_svg] - firebase_ui_oauth_google 1.0.13 [firebase_auth firebase_ui_oauth flutter google_sign_in] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_riverpod 1.0.4 [collection flutter meta riverpod state_notifier] - flutter_speed_dial 6.2.0 [flutter] - google_sign_in 5.4.2 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - intl 0.17.0 [clock path] - url_launcher 6.1.7 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] dev dependencies: - flutter_lints 2.0.1 [lints] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection matcher material_color_utilities meta source_span stre am_channel string_scanner term_glyph] transitive dependencies: - _flutterfire_internals 1.0.12 [collection firebase_core firebase_core_platform_interface flutter meta] - async 2.9.0 [collection meta] - boolean_selector 2.1.0 [source_span string_scanner] - characters 1.2.1 - clock 1.1.1 - cloud_firestore_platform_interface 5.10.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.2.1 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - crypto 3.0.2 [typed_data] - desktop_webview_auth 0.0.11 [crypto flutter http flutter_web_plugins plugin_platform_interface] - email_validator 2.1.17 - fake_async 1.3.1 [clock collection] - firebase_auth_platform_interface 6.11.7 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.2.4 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.5.2 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.1.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_dynamic_links_platform_interface 0.2.3+26 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_ui_localizations 1.0.2 [flutter flutter_localizations intl path] - firebase_ui_oauth 1.1.6 [desktop_webview_auth firebase_auth firebase_ui_auth flutter_svg flutter] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math] - flutter_svg 1.1.6 [flutter meta path_drawing vector_math xml] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - google_sign_in_android 6.1.4 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.5.1 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.3.0 [flutter plugin_platform_interface quiver] - google_sign_in_web 0.10.2 [flutter flutter_web_plugins google_sign_in_platform_interface js] - http 0.13.5 [async http_parser meta path] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - js 0.6.4 - lints 2.0.1 - matcher 0.12.12 [stack_trace] - material_color_utilities 0.1.5 - meta 1.8.0 - path 1.8.2 - path_drawing 1.0.1 [vector_math meta path_parsing flutter] - path_parsing 1.0.1 [vector_math meta] - petitparser 5.1.0 [meta] - plugin_platform_interface 2.1.3 [meta] - quiver 3.2.1 [matcher] - riverpod 1.0.3 [collection meta state_notifier] - sky_engine 0.0.99 - source_span 1.9.0 [collection path term_glyph] - stack_trace 1.10.0 [path] - state_notifier 0.7.2+1 [meta] - stream_channel 2.1.0 [async] - string_scanner 1.1.1 [source_span] - term_glyph 1.2.1 - test_api 0.4.12 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - typed_data 1.3.1 [collection] - url_launcher_android 6.0.22 [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] - url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.1.1 [flutter plugin_platform_interface] - url_launcher_web 2.0.13 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface] - vector_math 2.1.2 - xml 6.1.0 [collection meta petitparser] ```

darshankawar commented 1 year ago

Thanks for the report. This is replicable using iOS simulator as well like below:

Screenshot 2023-01-03 at 1 08 53 PM Screenshot 2023-01-03 at 1 09 03 PM