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.67k stars 3.97k forks source link

🐛 [firebase_auth] Platform interfaces must not be implemented with `implements` #9632

Closed cyberpwnn closed 1 year ago

cyberpwnn commented 2 years ago

Bug report

Describe the bug Calling FirebaseAuth.instance.signInWithCredential(credential) results in

I/flutter ( 4619): [Error]: Assertion failed: "Platform interfaces must not be implemented with `implements`"
I/flutter ( 4619): [Error]: #0      PlatformInterface._verify (package:plugin_platform_interface/plugin_platform_interface.dart:107:7)
I/flutter ( 4619): #1      PlatformInterface.verifyToken (package:plugin_platform_interface/plugin_platform_interface.dart:82:5)
I/flutter ( 4619): #2      FirebaseAppPlatform.verifyExtends (package:firebase_core_platform_interface/src/platform_interface/platform_interface_firebase_app.dart:19:23)
I/flutter ( 4619): #3      new FirebaseApp._ (package:firebase_core/src/firebase_app.dart:18:25)
I/flutter ( 4619): #4      Firebase.app (package:firebase_core/src/firebase.dart:58:24)
I/flutter ( 4619): #5      FirebaseAuth.instance (package:firebase_auth/src/firebase_auth.dart:44:47)
I/flutter ( 4619): #6      AuthService.signInWithGoogle (package:myguide/service/auth_service.dart:89:32)
I/flutter ( 4619): <asynchronous suspension>
I/flutter ( 4619): 

Steps to reproduce

Sign in with google like this

Future<UserCredential> signInWithGoogle() async {
  late UserCredential c;

  try {
    if (kIsWeb) {
      GoogleAuthProvider googleProvider = GoogleAuthProvider();
      c = await FirebaseAuth.instance.signInWithPopup(googleProvider);
    } else {
      GoogleSignInAccount? googleUser =
          await GoogleSignIn.standard().signIn();
      GoogleSignInAuthentication? googleAuth =
          await googleUser?.authentication;

      if (googleAuth == null) {
        error("Google Auth is null!");
        centerToast(Icons.error, "Authentication Failure");
      }

      OAuthCredential credential = GoogleAuthProvider.credential(
        accessToken: googleAuth?.accessToken,
        idToken: googleAuth?.idToken,
      );
      c = await FirebaseAuth.instance.signInWithCredential(credential);
    }
    Map<String, dynamic> profile = c.additionalUserInfo?.profile ?? {};
    String? firstName = profile["given_name"];
    String? lastName = profile["family_name"];
    String? profilePictureUrl = profile["picture"];
    mg.User user = await ctx().userService().getUserData(c.user!.uid,
        firstName: firstName, lastName: lastName, onSignedUp: (user) {
      info("User Signed Up!");
    });
  } catch (e, es) {
    error(e);
    error(es);
  }
  return c;
}

Expected behavior

Its supposed to work as it did the previous minor version bump


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` [√] Flutter (Channel stable, 3.3.0, on Microsoft Windows [Version 10.0.19044.1826], locale en-US) • Flutter version 3.3.0 on channel stable at C:\Users\cyberpwn\Documents\development\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision ffccd96b62 (4 weeks ago), 2022-08-29 17:28:57 -0700 • Engine revision 5e9e0e0aa8 • Dart version 2.18.0 • DevTools version 2.15.0 [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at C:\Users\cyberpwn\AppData\Local\Android\sdk • Platform android-33, build-tools 31.0.0 • Java binary at: C:\Program Files\Java\jdk-11.0.12\bin\java • Java version Java(TM) SE Runtime Environment 18.9 (build 11.0.12+8-LTS-237) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.6) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools • Visual Studio Build Tools 2019 version 16.11.31829.152 • Windows 10 SDK version 10.0.19041.0 [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions). [√] IntelliJ IDEA Ultimate Edition (version 2022.2) • IntelliJ at C:\Users\cyberpwn\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\222.4167.29 • Flutter plugin version 70.0.5 • Dart plugin version 222.4167.21 [√] VS Code (version 1.71.0) • VS Code at C:\Users\cyberpwn\AppData\Local\Programs\Microsoft VS Code • Flutter extension can be installed from: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [√] Connected device (4 available) • IN2017 (mobile) • 2e01d742 • android-arm64 • Android 11 (API 30) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.1826] • Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.128 • Edge (web) • edge • web-javascript • Microsoft Edge 99.0.1150.55 [√] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 1 category. ```

Flutter dependencies

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

Click To Expand ``` Dart SDK 2.18.0 Flutter SDK 3.3.0 myguide 1.0.0+26 dependencies: - after_layout 1.2.0 [flutter] - analyzer 4.7.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - animated_text_kit 4.2.2 [flutter characters] - archive 3.3.1 [crypto path] - auto_size_text 3.0.0 [flutter] - avatar_stack 1.1.2 [flutter] - badges 2.0.3 [flutter] - blur 3.1.0 [flutter] - blurhash_dart 1.1.0 [image] - cached_network_image 3.2.2 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web] - carousel_slider 4.1.1 [flutter] - chewie 1.3.5 [cupertino_icons flutter provider video_player wakelock] - circle_list 1.0.5 [flutter] - cloud_firestore 3.4.9 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_functions 3.3.8 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter] - colored_print 1.0.0 - confetti 0.7.0 [flutter vector_math] - connectivity_plus 2.3.7 [flutter connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows] - cross_file 0.3.3+2 [js meta] - crypto 3.0.2 [typed_data] - cupertino_icons 1.0.5 - custom_navigation_bar 0.8.2 [flutter] - date_time_format 2.0.1 - decorated_icon 1.2.1 [flutter] - dots_indicator 2.1.0 [flutter] - dough 1.0.3 [equatable flutter provider sensors vector_math] - duration 3.0.12 - easy_localization 3.0.1 [flutter shared_preferences intl args path easy_logger flutter_localizations] - equatable 2.0.5 [collection meta] - expandable_page_view 1.0.17 [flutter] - file_picker 5.2.0+1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32] - filesize 2.0.1 - firebase_analytics 9.3.6 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 3.10.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.23.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.8.11 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_database 9.1.5 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter] - firebase_messaging 13.0.3 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_performance 0.8.3+1 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter] - firebase_remote_config 2.0.18 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - firebase_storage 10.3.9 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - fluid_kit 2.1.0 [flutter] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_bounceable 1.0.3 [flutter] - flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid] - flutter_cache_manager_firebase 2.0.1 [flutter flutter_cache_manager firebase_storage path_provider path] - flutter_colorpicker 1.0.3 [flutter] - flutter_dropzone 3.0.5 [flutter flutter_dropzone_platform_interface flutter_dropzone_web] - flutter_fortune_wheel 1.2.0 [flutter flutter_hooks quiver] - flutter_local_notifications 10.0.0 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_markdown 0.6.12 [flutter markdown meta path] - flutter_native_splash 2.2.10+1 [args flutter flutter_web_plugins html image js meta path universal_io xml yaml] - flutter_oss_licenses 2.0.1 [path meta yaml dart_pubspec_licenses args] - flutter_picker 2.0.5 [flutter] - flutter_platform_widgets 2.0.0 [flutter] - flutter_scatter 0.2.0 [flutter] - flutter_staggered_grid_view 0.6.2 [flutter] - flutter_svg 1.1.5 [flutter meta path_drawing vector_math xml] - foil 0.9.0+1 [flutter sensors_plus] - get 4.6.5 [flutter] - glitcheffect 1.1.1 [flutter] - google_fonts 3.0.1 [flutter http path_provider crypto] - google_sign_in 5.4.2 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - googleapis 9.2.0 [_discoveryapis_commons http] - gradient_ui_widgets 1.0.2-nullsafety [flutter] - hand_signature 2.3.0+1 [flutter flutter_svg] - hive 2.2.3 [meta crypto] - hive_flutter 1.1.0 [flutter hive path_provider path] - http 0.13.5 [async http_parser meta path] - image 3.2.0 [archive meta xml] - intl 0.17.0 [clock path] - json_annotation 4.7.0 [meta] - json_serializable 6.4.1 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] - just_audio 0.9.29 [just_audio_platform_interface just_audio_web audio_session rxdart path path_provider async uuid crypto meta flutter] - just_waveform 0.0.3 [flutter path path_provider] - lazy_loading_list 1.0.1 [flutter] - local_auth 2.1.2 [flutter intl local_auth_android local_auth_ios local_auth_platform_interface local_auth_windows] - lzstring 2.0.0+2 [typed_data] - masonry_grid 1.0.0 [flutter] - new_keyboard_shortcuts 0.1.4 [flutter visibility_detector tuple] - oktoast 3.3.1 [flutter] - package_info_plus 1.4.3+1 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web] - 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] - patterns_canvas 0.4.0 [flutter] - pdf 3.8.3 [archive barcode crypto image meta path_parsing vector_math xml] - pinch_zoom 1.0.0 [flutter] - preload_page_view 0.1.6 [flutter] - provider 6.0.3 [collection flutter nested] - quick_actions 1.0.0 [flutter quick_actions_android quick_actions_ios quick_actions_platform_interface] - random_color_scheme 0.1.3 [flutter hsluv] - reactive_forms 14.1.0 [flutter intl] - reflectable 3.0.10 [analyzer build build_resolvers build_config build_runner build_runner_core dart_style glob logging package_config path source_span] - responsive_builder 0.4.3 [flutter] - rxdart 0.27.5 - scratcher 2.2.1 [flutter] - screenshot 1.2.3 [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] - shimmer 2.0.0 [flutter] - sign_in_with_apple 4.1.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web] - simple_gradient_text 1.2.4 [flutter] - sleek_circular_slider 2.0.1 [flutter] - sliver_tools 0.2.8 [flutter] - speech_balloon 0.0.4 [flutter] - styled_text 5.1.0 [flutter xmlstream] - syncfusion_flutter_calendar 20.2.50 [flutter timezone syncfusion_flutter_core syncfusion_flutter_datepicker intl] - syncfusion_flutter_charts 20.2.50 [flutter intl vector_math syncfusion_flutter_core] - syncfusion_flutter_datagrid 20.2.50 [flutter syncfusion_flutter_core collection] - syncfusion_flutter_datepicker 20.2.50 [flutter intl syncfusion_flutter_core] - syncfusion_flutter_gauges 20.2.50 [flutter syncfusion_flutter_core intl] - syncfusion_flutter_sliders 20.2.50 [flutter intl syncfusion_flutter_core] - syncfusion_flutter_treemap 20.2.50-beta [flutter syncfusion_flutter_core] - syncfusion_localizations 20.2.50 [flutter intl syncfusion_flutter_core] - synchronized 3.0.0+3 - tinycolor2 3.0.1 [flutter pigment] - transparent_image 2.0.0 - universal_html 2.0.8 [async csslib charcode collection html meta source_span typed_data universal_io] - universal_io 2.0.4 [collection crypto meta typed_data] - url_launcher 6.1.6 [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] - video_player 2.4.7 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web] - wakelock 0.6.2 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web wakelock_windows] - xl 0.9.1 [flutter sensors_plus] dev dependencies: - build_runner 2.2.1 [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 pac kage_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - flutter_gen_runner 5.0.0 [flutter_gen_core build collection crypto glob path] - flutter_launcher_icons 0.10.0 [args checked_yaml cli_util image json_annotation path yaml] - 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 stream_channel string_scanner term_glyph] transitive dependencies: - _discoveryapis_commons 1.0.3 [http http_parser meta] - _fe_analyzer_shared 47.0.0 [meta] - args 2.3.1 - async 2.9.0 [collection meta] - audio_session 0.1.10 [flutter flutter_web_plugins rxdart meta] - barcode 2.2.3 [meta qr] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.3.1 [analyzer async convert crypto glob logging meta path] - build_config 1.1.0 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 3.1.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.0.10 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.4 [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.4.1 [built_collection collection fixnum meta] - cached_network_image_platform_interface 2.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.0.2 [flutter flutter_cache_manager cached_network_image_platform_interface] - characters 1.2.1 - charcode 1.3.1 - checked_yaml 2.0.1 [json_annotation source_span yaml] - cli_util 0.3.5 [meta path] - clock 1.1.1 - cloud_firestore_platform_interface 5.7.5 [collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 2.8.8 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - cloud_functions_platform_interface 5.1.17 [firebase_core flutter meta plugin_platform_interface] - cloud_functions_web 4.3.6 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 4.3.0 [built_collection built_value collection matcher meta] - collection 1.16.0 - color 3.0.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.4 [connectivity_plus_platform_interface flutter_web_plugins flutter js] - connectivity_plus_windows 1.2.2 [connectivity_plus_platform_interface flutter] - convert 3.0.2 [typed_data] - csslib 0.17.2 [source_span] - dart_pubspec_licenses 2.0.2 [yaml path json_annotation] - dart_style 2.2.4 [analyzer args path pub_semver source_span] - dartx 1.1.0 [characters collection crypto meta path time] - dbus 0.7.8 [args ffi meta xml] - easy_logger 0.0.2 [flutter] - fake_async 1.3.1 [clock collection] - ffi 2.0.1 - file 6.1.4 [meta path] - firebase 9.0.3 [http http_parser js] - firebase_analytics_platform_interface 3.3.5 [firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.4.2+5 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.9.0 [collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 4.5.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.5.1 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 1.7.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.2.17 [collection firebase_core flutter meta plugin_platform_interface] - firebase_database_platform_interface 0.2.2+5 [collection firebase_core flutter meta plugin_platform_interface] - firebase_database_web 0.2.1+7 [firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins js] - firebase_messaging_platform_interface 4.1.5 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.1.5 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_performance_platform_interface 0.1.1+17 [firebase_core flutter plugin_platform_interface] - firebase_performance_web 0.1.1+6 [firebase firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js] - firebase_remote_config_platform_interface 1.1.17 [firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.1.6 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js] - firebase_storage_platform_interface 4.1.17 [collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.3.7 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - fixnum 1.0.1 - flutter_blurhash 0.7.0 [flutter] - flutter_dropzone_platform_interface 2.0.5 [flutter plugin_platform_interface] - flutter_dropzone_web 3.0.8 [flutter flutter_web_plugins flutter_dropzone_platform_interface js] - flutter_gen_core 5.0.0 [path yaml mime xml dartx color collection json_annotation glob dart_style analyzer args pub_semver source_span] - flutter_hooks 0.18.5+1 [flutter] - flutter_local_notifications_linux 1.0.0 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories] - flutter_local_notifications_platform_interface 6.0.0 [flutter plugin_platform_interface] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math] - flutter_plugin_android_lifecycle 2.0.7 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - frontend_server_client 2.1.3 [async path] - glob 2.1.0 [async collection file path string_scanner] - google_sign_in_android 6.1.1 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.5.0 [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] - graphs 2.1.0 [collection] - hsluv 1.1.2 [flutter] - html 0.15.0 [csslib source_span] - http_multi_server 3.2.1 [async] - http_parser 4.0.1 [collection source_span string_scanner typed_data] - io 1.0.3 [meta path string_scanner] - js 0.6.4 - just_audio_platform_interface 4.2.0 [flutter plugin_platform_interface] - just_audio_web 0.4.7 [just_audio_platform_interface flutter flutter_web_plugins] - lints 2.0.0 - local_auth_android 1.0.13 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface] - local_auth_ios 1.0.10 [flutter intl local_auth_platform_interface] - local_auth_platform_interface 1.0.5 [flutter intl plugin_platform_interface] - local_auth_windows 1.0.4 [flutter local_auth_platform_interface] - logging 1.0.2 - markdown 6.0.1 [args meta] - matcher 0.12.12 [stack_trace] - material_color_utilities 0.1.5 - meta 1.8.0 - mime 1.0.2 - nested 1.0.0 [flutter] - nm 0.5.0 [dbus] - octo_image 1.0.2 [flutter flutter_blurhash] - package_config 2.1.0 [path] - 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 2.1.0 [package_info_plus_platform_interface ffi flutter win32] - path 1.8.2 - path_drawing 1.0.1 [vector_math meta path_parsing flutter] - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.0.20 [flutter path_provider_platform_interface] - path_provider_ios 2.0.11 [flutter path_provider_platform_interface] - 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.5 [flutter platform plugin_platform_interface] - path_provider_windows 2.1.3 [ffi flutter path path_provider_platform_interface win32] - pedantic 1.11.1 - petitparser 5.0.0 [meta] - pigment 1.0.4 [flutter] - platform 3.1.0 - plugin_platform_interface 2.1.3 [meta] - pool 1.5.1 [async stack_trace] - process 4.2.4 [file path platform] - pub_semver 2.1.1 [collection meta] - pubspec_parse 1.2.1 [checked_yaml collection json_annotation pub_semver yaml] - qr 3.0.1 [meta] - quick_actions_android 0.6.2 [flutter quick_actions_platform_interface] - quick_actions_ios 0.6.0+14 [flutter quick_actions_platform_interface] - quick_actions_platform_interface 1.0.3 [flutter plugin_platform_interface] - quiver 3.1.0 [matcher] - sensors 2.0.3 [flutter] - sensors_plus 1.4.0 [flutter sensors_plus_web sensors_plus_platform_interface] - sensors_plus_platform_interface 1.1.1 [flutter meta plugin_platform_interface] - sensors_plus_web 1.1.1 [flutter sensors_plus_platform_interface flutter_web_plugins] - shared_preferences_android 2.0.13 [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.1.0 [flutter plugin_platform_interface] - 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] - shelf 1.4.0 [async collection http_parser path stack_trace stream_channel] - shelf_web_socket 1.0.2 [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] - sky_engine 0.0.99 - source_gen 1.2.5 [analyzer async build dart_style glob meta path source_span yaml] - source_helper 1.3.3 [analyzer collection source_gen] - source_span 1.9.0 [collection path term_glyph] - sqflite 2.1.0 [flutter sqflite_common path] - sqflite_common 2.3.0 [synchronized path meta] - stack_trace 1.10.0 [path] - stream_channel 2.1.0 [async] - stream_transform 2.0.0 - string_scanner 1.1.1 [source_span] - syncfusion_flutter_core 20.2.50 [vector_math flutter] - 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] - time 2.1.3 [clock] - timezone 0.8.0 [path] - timing 1.0.0 [json_annotation] - tuple 2.0.0 [quiver] - typed_data 1.3.1 [collection] - url_launcher_android 6.0.19 [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 - video_player_android 2.3.9 [flutter video_player_platform_interface] - video_player_avfoundation 2.3.6 [flutter video_player_platform_interface] - video_player_platform_interface 5.1.4 [flutter plugin_platform_interface] - video_player_web 2.0.12 [flutter flutter_web_plugins video_player_platform_interface] - visibility_detector 0.2.2 [flutter] - wakelock_macos 0.4.0 [flutter flutter_web_plugins wakelock_platform_interface] - wakelock_platform_interface 0.3.0 [flutter meta] - wakelock_web 0.4.0 [flutter flutter_web_plugins js wakelock_platform_interface] - wakelock_windows 0.2.1 [flutter wakelock_platform_interface win32] - watcher 1.0.1 [async path] - web_socket_channel 2.2.0 [async crypto stream_channel] - win32 3.0.0 [ffi] - xdg_directories 0.2.0+2 [meta path process] - xml 6.1.0 [collection meta petitparser] - xmlstream 1.0.0 - yaml 3.1.1 [collection source_span string_scanner] ```

darshankawar commented 2 years ago

Thanks for the report @cyberpwnn What platform are you seeing this error on ? (Android, iOS or web). I tried the code sample you provided on iOS and web but didn't get the reported error. I used below code:

late UserCredential c;

    try {
      if (kIsWeb) {
        GoogleAuthProvider googleProvider = GoogleAuthProvider();
        c = await FirebaseAuth.instance.signInWithPopup(googleProvider);
      } else {
        GoogleSignInAccount? googleUser =
        await GoogleSignIn.standard().signIn();
        GoogleSignInAuthentication? googleAuth =
        await googleUser?.authentication;

        if (googleAuth == null) {
          print("Google Auth is null!");
        }

        OAuthCredential credential = GoogleAuthProvider.credential(
          accessToken: googleAuth?.accessToken,
          idToken: googleAuth?.idToken,
        );
        c = await FirebaseAuth.instance.signInWithCredential(credential);
      }
      Map<String, dynamic> profile = c.additionalUserInfo?.profile ?? {};
      String? firstName = profile["given_name"];
      String? lastName = profile["family_name"];
    } catch (e, es) {
      print(e);
      print(es);
    }
    return c.user;
  }

I used above code in firebase_auth_example plugin.

Can you also confirm if you are able to replicate only using flutterfire plugins without using any external plugins that are seen in your dependency section ? Also, if above doesn't represent your case, please provide exact steps to replicate.

google-oss-bot commented 2 years ago

Hey @cyberpwnn. 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 1 year ago

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

@cyberpwnn 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.