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

πŸ› [flutterfire_ui] Google Login will not open keyboard if not logged in iPad (iOS) #8391

Closed alarmatwork closed 2 years ago

alarmatwork commented 2 years ago

Bug report

Describe the bug When using Google Login configuration, then in iOS the Google Login popup is served, but if user need to enter e-mail or password, then keyboard is not dispalyed, user can not continue.

Steps to reproduce

Steps to reproduce the behaviour:

  1. Add GoogleProviderConfiguration(clientId: c.GOOGLE_CLIENT_ID), to
  2. Open login dialog, click on Google login option with iPad
  3. From Google Login popup select existing email login
  4. If user is not logged in, then password is prompted
  5. Can not enter the password as keyboard is not opened

Expected behavior

The virtual keyboard should be displayed on the screen.

Sample project

return const SignInScreen(
  providerConfigs: [
    GoogleProviderConfiguration(clientId: GOOGLE_CLIENT_ID),
  ],
);

Additional context

You should log out from Google on you Safari browser first to reproduce the issue. Have not tested with iPhone, but happens of phsysical iPad (gen 5 ) device with iPadOS 15.4.1


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` Doctor summary (to see all details, run flutter doctor -v): [βœ“] Flutter (Channel stable, 2.10.4, on macOS 12.2.1 21D62 darwin-arm, locale en-EE) [βœ“] Android toolchain - develop for Android devices (Android SDK version 32.0.0) [βœ“] Xcode - develop for iOS and macOS (Xcode 13.3) [βœ“] Chrome - develop for the web [βœ“] Android Studio (version 2021.1) [βœ“] VS Code (version 1.65.2) [βœ“] Connected device (3 available) [βœ“] HTTP Host Availability β€’ No issues found! ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` Dart SDK 2.16.2 Flutter SDK 2.10.4 play_faire 1.0.65+65 dependencies: - badges 2.0.2 [flutter] - cloud_firestore 3.1.11 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_functions 3.2.10 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter] - date_picker_timeline 1.2.3 [flutter intl] - firebase_analytics 9.1.2 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 3.3.12 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.13.1 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_dynamic_links 4.1.2 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_messaging 11.2.11 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_remote_config 2.0.2 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - flutter 0.0.0 [characters collection material_color_utilities meta typed_data vector_math sky_engine] - flutter_app_badger 1.3.0 [flutter] - flutter_form_builder 7.1.0 [flutter intl] - flutter_google_places 0.3.0 [flutter google_api_headers google_maps_webservice http rxdart] - flutter_hooks 0.18.2+1 [flutter] - flutter_launcher_icons 0.9.2 [args image path yaml] - flutter_linkify 5.0.2 [flutter linkify] - flutter_local_notifications 9.4.0 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path typed_data vector_math] - flutter_loggy 2.0.1 [flutter loggy rxdart] - flutter_picker 2.0.3 [flutter] - flutterfire_ui 0.4.0 [cloud_firestore collection crypto desktop_webview_auth email_validator firebase_auth firebase_core firebase_database firebase_dynamic_links flutter flutter_facebook_auth flutter_localizations flutter_svg google_sign_in sign_in_with_apple twitter_login] - fluttertoast 8.0.9 [flutter flutter_web_plugins] - form_builder_extra_fields 7.1.0 [flutter flutter_form_builder flutter_chips_input flutter_colorpicker dropdown_search signature flutter_touch_spin intl flutter_typeahead flutter_datetime_picker_bdaya flutter_rating_bar] - form_builder_phone_field 1.0.0-beta.0 [flutter flutter_form_builder phone_number country_pickers] - form_builder_validators 7.1.0 [flutter flutter_localizations intl collection] - freezed_annotation 1.1.0 [collection json_annotation meta] - google_sign_in 5.2.4 [flutter google_sign_in_platform_interface google_sign_in_web] - hooks_riverpod 1.0.3 [collection flutter flutter_hooks flutter_riverpod riverpod state_notifier] - intl 0.17.0 [clock path] - intro_slider 3.0.3 [flutter] - loggy 2.0.1+1 [stack_trace] - mixpanel_flutter 1.4.5 [flutter flutter_web_plugins js] - overlay_support 1.2.1 [flutter async] - package_info_plus 1.4.0 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web] - search_map_location 0.0.5 [flutter http] - share_plus 3.1.0 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web] - shared_preferences 2.0.13 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - sign_in_with_apple 3.3.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web] - store_redirect 2.0.1 [flutter] - universal_io 2.0.4 [collection crypto meta typed_data] - url_launcher 6.0.20 [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: - build_runner 2.1.8 [args async analyzer build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - flutter_gen_runner 4.1.6 [flutter_gen_core build] - flutter_lints 1.0.4 [lints] - freezed 1.1.1 [analyzer build build_config collection meta source_gen freezed_annotation] - json_serializable 6.1.5 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] - sentry_flutter 6.4.0 [flutter flutter_web_plugins sentry package_info_plus meta] - test 1.20.1 [analyzer async boolean_selector collection coverage http_multi_server io js node_preamble package_config path pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core] transitive dependencies: - _fe_analyzer_shared 36.0.0 [meta] - analyzer 3.3.1 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.2.2 [crypto path] - args 2.3.0 - async 2.8.2 [collection meta] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.2.1 [analyzer async convert crypto glob logging meta path] - build_config 1.0.0 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 3.0.1 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.0.6 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.3 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pool timing watcher yaml] - built_collection 5.1.1 - built_value 8.1.4 [built_collection collection fixnum meta] - characters 1.2.0 - charcode 1.3.1 - checked_yaml 2.0.1 [json_annotation source_span yaml] - clock 1.1.0 - cloud_firestore_platform_interface 5.5.2 [collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 2.6.11 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - cloud_functions_platform_interface 5.1.1 [firebase_core flutter meta plugin_platform_interface] - cloud_functions_web 4.2.9 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 4.1.0 [built_collection built_value collection matcher meta] - collection 1.15.0 - color 3.0.0 - convert 3.0.1 [typed_data] - country_pickers 2.0.0 [flutter] - coverage 1.1.0 [args logging package_config path source_maps stack_trace vm_service] - crypto 3.0.1 [collection typed_data] - dart_style 2.2.2 [analyzer args path pub_semver source_span] - dartx 1.0.0 [characters collection crypto meta path time] - dbus 0.7.1 [args ffi meta xml] - desktop_webview_auth 0.0.6 [crypto flutter http] - dropdown_search 2.0.1 [flutter] - email_validator 2.0.1 - ffi 1.1.2 - file 6.1.2 [meta path] - firebase_analytics_platform_interface 3.1.1 [firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.4.0+8 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.2.2 [firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 3.3.10 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.2.5 [collection flutter meta plugin_platform_interface] - firebase_core_web 1.6.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_database 9.0.9 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter] - firebase_database_platform_interface 0.2.1+2 [collection firebase_core flutter meta plugin_platform_interface] - firebase_database_web 0.2.0+8 [firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins js] - firebase_dynamic_links_platform_interface 0.2.2+2 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 3.2.1 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 2.2.9 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_remote_config_platform_interface 1.1.1 [firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.0.7 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js] - fixnum 1.0.0 - flutter_chips_input 1.10.0 [flutter] - flutter_colorpicker 1.0.3 [flutter] - flutter_datetime_picker_bdaya 2.0.0 [flutter] - flutter_facebook_auth 4.1.1 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web] - flutter_facebook_auth_platform_interface 3.0.1 [flutter plugin_platform_interface] - flutter_facebook_auth_web 3.0.0+1 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface] - flutter_gen_core 4.1.6 [path yaml mime xml dartx color collection json_annotation dart_style analyzer args pub_semver source_span] - flutter_keyboard_visibility 5.2.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_web flutter] - 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_rating_bar 4.0.0 [flutter] - flutter_riverpod 1.0.3 [collection flutter meta riverpod state_notifier] - flutter_svg 1.0.3 [flutter meta path_drawing vector_math xml] - flutter_touch_spin 2.0.0 [flutter intl] - flutter_typeahead 3.2.4 [flutter flutter_keyboard_visibility] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta typed_data vector_math] - frontend_server_client 2.1.2 [async path] - glob 2.0.2 [async collection file path string_scanner] - google_api_headers 1.2.0 [flutter package_info_plus] - google_maps_webservice 0.0.20-nullsafety.5 [http meta json_annotation] - google_sign_in_platform_interface 2.1.2 [flutter quiver] - google_sign_in_web 0.10.0+5 [flutter flutter_web_plugins google_sign_in_platform_interface js] - graphs 2.1.0 [collection] - http 0.13.4 [async http_parser meta path] - http_multi_server 3.2.0 [async] - http_parser 4.0.0 [charcode collection source_span string_scanner typed_data] - image 3.1.3 [archive meta xml] - io 1.0.3 [meta path string_scanner] - js 0.6.3 - json_annotation 4.4.0 [meta] - linkify 4.1.0 - lints 1.0.1 - logging 1.0.2 - matcher 0.12.11 [stack_trace] - material_color_utilities 0.1.3 - meta 1.7.0 - mime 1.0.1 - node_preamble 2.0.1 - package_config 2.0.2 [path] - package_info_plus_linux 1.0.3 [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.4 [flutter flutter_web_plugins http meta package_info_plus_platform_interface] - package_info_plus_windows 1.0.4 [package_info_plus_platform_interface ffi flutter win32] - path 1.8.0 - path_drawing 1.0.0 [vector_math meta path_parsing flutter] - path_parsing 1.0.0 [vector_math meta] - path_provider_linux 2.1.5 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_platform_interface 2.0.3 [flutter platform plugin_platform_interface] - path_provider_windows 2.0.5 [ffi flutter path path_provider_platform_interface win32] - petitparser 4.4.0 [meta] - phone_number 0.12.0+1 [flutter meta] - platform 3.1.0 - plugin_platform_interface 2.1.2 [meta] - pool 1.5.0 [async stack_trace] - process 4.2.4 [file path platform] - pub_semver 2.1.1 [collection meta] - pubspec_parse 1.2.0 [checked_yaml collection json_annotation pub_semver yaml] - quiver 3.0.1+1 [matcher] - riverpod 1.0.3 [collection meta state_notifier] - rxdart 0.26.0 - sentry 6.4.0 [http meta stack_trace uuid] - share_plus_linux 2.0.4 [share_plus_platform_interface file flutter meta url_launcher] - share_plus_macos 2.1.0 [share_plus_platform_interface flutter] - share_plus_platform_interface 2.1.0 [flutter meta mime plugin_platform_interface] - share_plus_web 2.0.4 [share_plus_platform_interface url_launcher flutter flutter_web_plugins meta] - share_plus_windows 2.0.3 [share_plus_platform_interface flutter meta url_launcher] - shared_preferences_android 2.0.11 [flutter shared_preferences_platform_interface] - shared_preferences_ios 2.1.0 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.1.0 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_macos 2.0.3 [flutter shared_preferences_platform_interface] - shared_preferences_platform_interface 2.0.0 [flutter] - shared_preferences_web 2.0.3 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.1.0 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.2.0 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 3.0.0 [path shelf shelf_static] - shelf_static 1.1.0 [convert http_parser mime path shelf] - shelf_web_socket 1.0.1 [shelf stream_channel web_socket_channel] - sign_in_with_apple_platform_interface 1.0.0 [flutter plugin_platform_interface meta] - sign_in_with_apple_web 1.0.1 [flutter flutter_web_plugins sign_in_with_apple_platform_interface js] - signature 5.0.0 [flutter image] - sky_engine 0.0.99 - source_gen 1.2.1 [analyzer async build dart_style glob meta path source_span yaml] - source_helper 1.3.1 [analyzer collection source_gen] - source_map_stack_trace 2.1.0 [path stack_trace source_maps] - source_maps 0.10.10 [source_span] - source_span 1.8.2 [collection path term_glyph] - stack_trace 1.10.0 [path] - state_notifier 0.7.2+1 [meta] - stream_channel 2.1.0 [async] - stream_transform 2.0.0 - string_scanner 1.1.0 [charcode source_span] - term_glyph 1.2.0 - test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - test_core 0.4.11 [analyzer async args boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api] - time 2.1.0 [clock] - timezone 0.8.0 [path] - timing 1.0.0 [json_annotation] - twitter_login 4.0.1 [flutter crypto http] - typed_data 1.3.0 [collection] - url_launcher_android 6.0.15 [flutter url_launcher_platform_interface] - url_launcher_ios 6.0.15 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.0 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.0 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.0.5 [flutter plugin_platform_interface] - url_launcher_web 2.0.9 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.0 [flutter url_launcher_platform_interface] - uuid 3.0.6 [crypto] - vector_math 2.1.1 - vm_service 8.2.1 - watcher 1.0.1 [async path] - web_socket_channel 2.1.0 [async crypto stream_channel] - webkit_inspection_protocol 1.0.0 [logging] - win32 2.4.1 [ffi] - xdg_directories 0.2.0+1 [meta path process] - xml 5.3.1 [collection meta petitparser] - yaml 3.1.0 [collection source_span string_scanner] ```

lesnitsky commented 2 years ago

@alarmatwork could you please double check if this is flutterfire_ui specific issue? I don't see how this would be caused by the flutterfire_ui, so probably it could be google_sign_in specific

You can use this quick example to test if this works for google_sign_in alone:

import 'package:flutter/material.dart';
import 'package:google_sign_in/google_sign_in.dart';

void main() {
  runApp(const App());
}

class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Home(),
    );
  }
}

final _googleSignIn = GoogleSignIn(
  scopes: [
    'email',
    'https://www.googleapis.com/auth/contacts.readonly',
  ],
);

class Home extends StatelessWidget {
  const Home({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Builder(builder: (context) {
          return TextButton(
            onPressed: () async {
              try {
                await _googleSignIn.signIn();
              } catch (err) {
                ScaffoldMessenger.of(context)
                    .showSnackBar(SnackBar(content: Text(err.toString())));
              }
            },
            child: const Text('Sign in with google'),
          );
        }),
      ),
    );
  }
}
google-oss-bot commented 2 years ago

Hey @alarmatwork. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 2 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@alarmatwork if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.