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

🐛 [Flutter News Template] Cannot log in with email on flutter news template #11238

Closed partiallyanonymous1 closed 1 year ago

partiallyanonymous1 commented 1 year ago

Bug report

Really appreciate any help. thank you! :)

Describe the bug I originally posted (https://github.com/flutter/flutter/issues/129928 ) this directly to the flutter news app team (https://flutter.github.io/news_toolkit/ ), and they said it was a problem with firebase and to post it here. The bug is that after creating the flutter news app from the mason template, I then went about setting up the various features. After months, I'm still stuck on getting users to log into the app. When I run the production flavor of the app, I can successfully get users to sign in with google, but this doesn't work when i run the development flavor of the app. Also, regardless of the flavor I cannot get sign with email to ever work. (Error output/log at bottom)

Steps to reproduce

Follow the guide at https://flutter.github.io/news_toolkit/ to make a new app from the template using mason. Then follow the firebase set up steps. This includes adding the SHA-1 and SHA-256 keys to the firebase project. (I tried various mason versions of the flutter news template on various computers [windows, mac]) Using android studio, run the app and use the prebuilt/default UI to click "Log In" and "Continue with Google" Observe that when you run the production flavor, signing in with google works, but it doesn't work for the development flavor.

Expected behavior

I expect to be able to log in with google when running the development flavor and also to sign in with email in all flavors.

Sample project

To create a sample project, simply follow the directions at https://flutter.github.io/news_toolkit/ to create a new app using their template. I named my app com.google.news.template and added the debug SHA 1 and SHA 256 keys to my firebase app and downloaded the relevant google-services.json. I cannot figure out for the life of me what set-up step I'm missing that could make sign in with google work for the production version but not the development verison or why sign in with email doesn't work at all for any version.


Additional context

I tried recreating the app multiple times with different versions of the mason template on multiple computers, both mac and windows. (Error output/log at bottom)


Flutter doctor

Run flutter doctor and paste the output below:

Doctor output from windows computer used ```console [✓] Flutter (Channel stable, 3.7.12, on Microsoft Windows [Version 10.0.22621.1848], locale en-US) • Flutter version 3.7.12 on channel stable at C:\src\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 4d9e56e694 (3 months ago), 2023-04-17 21:47:46 -0400 • Engine revision 1a65d409c7 • Dart version 2.19.6 • DevTools version 2.20.1 [✓] Windows Version (Installed version of Windows is version 10 or higher) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at C:\Users\miros\AppData\Local\Android\Sdk • Platform android-33-ext4, build-tools 33.0.2 • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619) • 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 Community 2022 17.5.1) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.5.33424.131 • Windows 10 SDK version 10.0.22000.0 [✓] Android Studio (version 2022.1) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619) [✓] VS Code (version 1.79.2) • VS Code at C:\Users\miros\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) • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 31) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.1848] • Chrome (web) • chrome • web-javascript • Google Chrome 114.0.5735.134 • Edge (web) • edge • web-javascript • Microsoft Edge 114.0.1823.67 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found! ```
Doctor output from mac computer used ```console [✓] Flutter (Channel stable, 3.7.9, on macOS 13.3.1 22E772610a darwin-arm64, locale en-US) • Flutter version 3.7.9 on channel stable at /Users/siruiwang/Desktop/miro/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 62bd79521d (3 months ago), 2023-03-30 10:59:36 -0700 • Engine revision ec975089ac • Dart version 2.19.6 • DevTools version 2.20.1 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at /Users/siruiwang/Library/Android/sdk • Platform android-33, build-tools 33.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E300c • CocoaPods version 1.12.0 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) [✓] VS Code (version 1.79.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.68.0 [✓] Connected device (3 available) • iPhone 12 (mobile) • 37338B90-31A0-4719-8F93-215472A0A52A • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.3.1 22E772610a darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 114.0.5735.198 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found! ```

Flutter dependencies

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

Click To Expand flutter dependencies for windows version ``` Dart SDK 2.19.6 Flutter SDK 3.7.12 daily_globe 0.0.1+1 dependencies: - ads_consent_client 1.0.0+1 [flutter google_mobile_ads] - analytics_repository 0.0.0 [equatable firebase_analytics flutter very_good_analysis] - app_ui 0.0.0 [flutter flutter_svg intl mockingjay] - article_repository 1.0.0+1 [clock equatable daily_globe_api storage] - authentication_client 0.0.0 [equatable] - bloc 8.1.1 [meta] - bloc_concurrency 0.2.1 [bloc stream_transform] - clock 1.1.1 - collection 1.17.0 - daily_globe_api 0.1.0+1 [collection dart_frog equatable http json_annotation news_blocks] - deep_link_client 0.0.0 [equatable firebase_core firebase_dynamic_links plugin_platform_interface rxdart very_good_analysis] - email_launcher 1.0.0+1 [android_intent_plus flutter platform plugin_platform_interface url_launcher url_launcher_platform_interface] - equatable 2.0.5 [collection meta] - firebase_analytics 10.1.3 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth_platform_interface 6.11.10 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_authentication_client 1.0.0+1 [authentication_client firebase_auth firebase_auth_platform_interface firebase_core firebase_core_platform_interface flutter flutter_facebook_auth google_sign_in plugin_platform_interface sign_in_with_apple token_storage twitter_login] - firebase_core 2.6.1 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 3.0.14 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_dynamic_links 5.0.14 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_messaging 14.2.4 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_notifications_client 1.0.0+1 [firebase_messaging flutter notifications_client] - flow_builder 0.0.9 [flutter] - flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine] - flutter_bloc 8.1.2 [flutter bloc provider] - flutter_localizations 0.0.0 [flutter intl characters clock collection js material_color_utilities meta path vector_math] - flutter_svg 1.1.6 [flutter meta path_drawing vector_math xml] - font_awesome_flutter 10.4.0 [flutter] - form_inputs 0.0.0 [formz] - google_mobile_ads 2.3.0 [meta flutter visibility_detector] - hydrated_bloc 9.1.0 [bloc hive meta synchronized] - in_app_purchase_repository 1.0.0+1 [authentication_client equatable flutter daily_globe_api in_app_purchase] - intl 0.17.0 [clock path] - json_annotation 4.8.0 [meta] - mockingjay 0.3.0 [flutter flutter_test matcher mocktail test] - news_blocks 1.0.0+1 [equatable json_annotation meta] - news_blocks_ui 1.0.0+1 [app_ui cached_network_image flutter flutter_html google_mobile_ads news_blocks path_provider_platform_interface platform plugin_platform_interface url_launcher url_launcher_platform_interface video_player video_player_platform_interface] - news_repository 1.0.0+1 [equatable daily_globe_api] - notifications_repository 1.0.0+1 [equatable flutter daily_globe_api notifications_client permission_client storage test] - package_info_client 1.0.0+1 [equatable] - path_provider 2.0.12 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - permission_client 1.0.0+1 [flutter permission_handler] - persistent_storage 0.0.0 [flutter shared_preferences storage] - platform 3.1.0 - purchase_client 1.0.0+1 [clock equatable flutter in_app_purchase in_app_purchase_platform_interface] - share_launcher 1.0.0+1 [equatable flutter share_plus share_plus_platform_interface] - shared_preferences 2.0.17 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - stream_transform 2.1.0 - test 1.22.0 [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] - token_storage 1.0.0+1 - url_launcher 6.1.9 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - user_repository 0.0.0 [authentication_client deep_link_client equatable daily_globe_api package_info_client rxdart storage] - very_good_analysis 4.0.0+1 - visibility_detector 0.3.3 [flutter] dev dependencies: - bloc_test 9.1.1 [bloc diff_match_patch meta mocktail test] - build_runner 2.3.3 [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] - build_verify 3.1.0 [io path test] - build_version 2.1.1 [build build_config pubspec_parse] - fake_async 1.3.1 [clock collection] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection js matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - json_serializable 6.6.1 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] - mocktail 0.3.0 [collection matcher test] - mocktail_image_network 0.3.1 [mocktail] transitive dependencies: - _fe_analyzer_shared 53.0.0 [meta] - _flutterfire_internals 1.0.15 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 5.5.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - android_intent_plus 3.1.6 [flutter platform meta] - args 2.4.0 - async 2.10.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - build 2.3.1 [analyzer async convert crypto glob logging meta path] - build_config 1.1.1 [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.2.0 [analyzer async build collection crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.7 [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.3 [built_collection collection fixnum meta] - cached_network_image 3.2.3 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web] - 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 - checked_yaml 2.0.2 [json_annotation source_span yaml] - code_builder 4.4.0 [built_collection built_value collection matcher meta] - convert 3.1.1 [typed_data] - coverage 1.6.3 [args logging package_config path source_maps stack_trace vm_service] - cross_file 0.3.3+4 [js meta] - crypto 3.0.2 [typed_data] - csslib 0.17.2 [source_span] - dart_frog 0.3.3 [http_methods shelf shelf_hotreload shelf_static] - dart_style 2.2.4 [analyzer args path pub_semver source_span] - diff_match_patch 0.4.1 - ffi 2.0.1 - file 6.1.4 [meta path] - firebase_analytics_platform_interface 3.3.20 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.1+11 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth 4.2.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_auth_web 5.2.7 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.5.3 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.2.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.3.14 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.3+29 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.2.13 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.2.14 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - fixnum 1.1.0 - flutter_blurhash 0.7.0 [flutter] - flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid] - flutter_facebook_auth 4.4.1+1 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web] - flutter_facebook_auth_platform_interface 3.2.0 [flutter plugin_platform_interface] - flutter_facebook_auth_web 3.2.0 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface] - flutter_html 3.0.0-alpha.6 [html csslib collection numerus flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - formz 0.5.0-dev.1 [meta] - frontend_server_client 3.2.0 [async path] - glob 2.1.1 [async collection file path string_scanner] - google_sign_in 5.4.4 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - google_sign_in_android 6.1.6 [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+1 [flutter flutter_web_plugins google_sign_in_platform_interface js] - graphs 2.2.0 [collection] - hive 2.2.3 [meta crypto] - hotreloader 3.0.5 [collection logging path stream_transform vm_service watcher] - html 0.15.1 [csslib source_span] - http 0.13.5 [async http_parser meta path] - http_methods 1.1.0 - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - in_app_purchase 3.1.4 [flutter in_app_purchase_android in_app_purchase_platform_interface in_app_purchase_storekit] - in_app_purchase_android 0.2.4+1 [collection flutter in_app_purchase_platform_interface json_annotation] - in_app_purchase_platform_interface 1.3.2 [flutter plugin_platform_interface] - in_app_purchase_storekit 0.3.6 [collection flutter in_app_purchase_platform_interface json_annotation] - io 1.0.4 [meta path string_scanner] - js 0.6.5 [meta] - logging 1.1.1 - matcher 0.12.13 [meta stack_trace] - material_color_utilities 0.2.0 - meta 1.8.0 - mime 1.0.4 - nested 1.0.0 [flutter] - node_preamble 2.0.1 - notifications_client 1.0.0+1 - numerus 2.0.0 [characters] - octo_image 1.0.2 [flutter flutter_blurhash] - package_config 2.1.0 [path] - 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.22 [flutter path_provider_platform_interface] - path_provider_foundation 2.1.1 [flutter path_provider_platform_interface] - path_provider_linux 2.1.8 [ffi flutter path path_provider_platform_interface xdg_directories] - 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 - permission_handler 10.2.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - permission_handler_android 10.2.0 [flutter permission_handler_platform_interface] - permission_handler_apple 9.0.7 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 3.9.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.1.2 [flutter permission_handler_platform_interface] - petitparser 5.1.0 [meta] - plugin_platform_interface 2.1.3 [meta] - pool 1.5.1 [async stack_trace] - process 4.2.4 [file path platform] - provider 6.0.5 [collection flutter nested] - pub_semver 2.1.3 [collection meta] - pubspec_parse 1.2.1 [checked_yaml collection json_annotation pub_semver yaml] - quiver 3.2.1 [matcher] - rxdart 0.27.7 - share_plus 6.3.1 [cross_file meta mime flutter flutter_web_plugins share_plus_platform_interface file url_launcher_web url_launcher_windows url_launcher_linux url_launcher_platform_interface ffi win32] - share_plus_platform_interface 3.2.0 [cross_file flutter meta mime plugin_platform_interface path_provider uuid] - shared_preferences_android 2.0.15 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.1.3 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.1.3 [file flutter path path_provider_linux path_provider_platform_interface 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.3 [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_hotreload 1.4.0 [hotreloader logging] - shelf_packages_handler 3.0.1 [path shelf shelf_static] - shelf_static 1.1.1 [convert http_parser mime path shelf] - shelf_web_socket 1.0.3 [shelf stream_channel web_socket_channel] - sign_in_with_apple 4.3.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web] - 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.7 [analyzer async build dart_style glob path source_span yaml] - source_helper 1.3.3 [analyzer collection source_gen] - source_map_stack_trace 2.1.1 [path source_maps stack_trace] - source_maps 0.10.12 [source_span] - source_span 1.9.1 [collection path term_glyph] - sqflite 2.2.4+1 [flutter sqflite_common path] - sqflite_common 2.4.2+2 [synchronized path meta] - stack_trace 1.11.0 [path] - storage 0.0.0 - stream_channel 2.1.1 [async] - string_scanner 1.2.0 [source_span] - synchronized 3.0.1 - term_glyph 1.2.1 - test_api 0.4.16 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - test_core 0.4.20 [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] - timing 1.0.1 [json_annotation] - twitter_login 4.3.1 [flutter crypto http] - typed_data 1.3.1 [collection] - url_launcher_android 6.0.23 [flutter url_launcher_platform_interface] - url_launcher_ios 6.1.0 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.2 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.2 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.1.1 [flutter plugin_platform_interface] - url_launcher_web 2.0.14 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.3 [flutter url_launcher_platform_interface] - uuid 3.0.7 [crypto] - vector_math 2.1.4 - video_player 2.5.1 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web] - video_player_android 2.3.10 [flutter video_player_platform_interface] - video_player_avfoundation 2.3.8 [flutter video_player_platform_interface] - video_player_platform_interface 5.1.4 [flutter plugin_platform_interface] - video_player_web 2.0.13 [flutter flutter_web_plugins video_player_platform_interface] - vm_service 9.4.0 - watcher 1.0.2 [async path] - web_socket_channel 2.3.0 [async crypto stream_channel] - webkit_inspection_protocol 1.2.0 [logging] - win32 3.1.3 [ffi] - xdg_directories 1.0.0 [meta path process] - xml 6.2.2 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

Currently the error code I get when I run the development flavor of the app on a simulated pixel 4 api 31 on windows 11 with android studio is ``` [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.pure(value: , isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.failure, false), event: LoginGoogleSubmitted(AnalyticsEvent(LoginGoogleSubmitted, null)), nextState: LoginState(FormzInput.pure(value: , isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.inProgress, false) } W/System ( 5017): Ignoring header X-Firebase-Locale because its value was null. [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.pure(value: , isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.inProgress, false), event: LoginGoogleSubmitted(AnalyticsEvent(LoginGoogleSubmitted, null)), nextState: LoginState(FormzInput.pure(value: , isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.failure, false) } [log] onError LoginBloc Instance of 'LogInWithGoogleFailure' #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7) #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18) #2 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:518:43) #3 MethodChannelFirebaseAuth.signInWithCredential (package:firebase_auth_platform_interface/src/method_channel/method_channel_firebase_auth.dart:461:12) #4 FirebaseAuth.signInWithCredential (package:firebase_auth/src/firebase_auth.dart:526:9) #5 FirebaseAuthenticationClient.logInWithGoogle (package:firebase_authentication_client/src/firebase_authentication_client.dart:105:7) #6 UserRepository.logInWithGoogle (package:user_repository/src/user_repository.dart:121:7) #7 LoginBloc._onGoogleSubmitted (package:daily_globe/login/bloc/login_bloc.dart:60:7) #8 Bloc.on..handleEvent (package:bloc/src/bloc.dart:226:13) D/EGL_emulation( 5017): app_time_stats: avg=118.94ms min=3.73ms max=4017.17ms count=38 ```
No matter the production flavor or anything else I do, I can never successfully "continue with email" For example, if I try to make an account for e@e.com this is the output (where the first few paragraphs of log output are it processing each letter typed: ``` console log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.pure(value: , isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e), nextState: LoginState(FormzInput.dirty(value: e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@), nextState: LoginState(FormzInput.dirty(value: e@, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e), nextState: LoginState(FormzInput.dirty(value: e@e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.), nextState: LoginState(FormzInput.dirty(value: e@e., isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e., isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.x), nextState: LoginState(FormzInput.dirty(value: e@e.x, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.x, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.), nextState: LoginState(FormzInput.dirty(value: e@e., isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e., isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.c), nextState: LoginState(FormzInput.dirty(value: e@e.c, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.c, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.co), nextState: LoginState(FormzInput.dirty(value: e@e.co, isValid: true, error: null), FormzSubmissionStatus.initial, true) } [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.co, isValid: true, error: null), FormzSubmissionStatus.initial, true), event: LoginEmailChanged(e@e.com), nextState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.initial, true) } [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.initial, true), event: SendEmailLinkSubmitted(AnalyticsEvent(SendEmailLinkSubmitted, null)), nextState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.inProgress, true) } [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.inProgress, true), event: SendEmailLinkSubmitted(AnalyticsEvent(SendEmailLinkSubmitted, null)), nextState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.failure, true) } [log] onError LoginBloc Instance of 'SendLoginEmailLinkFailure' #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7) https://github.com/flutter/flutter/pull/1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18) https://github.com/flutter/flutter/pull/2 MethodChannelFirebaseAuth.sendSignInLinkToEmail (package:firebase_auth_platform_interface/src/method_channel/method_channel_firebase_auth.dart:360:7) https://github.com/flutter/flutter/pull/3 FirebaseAuth.sendSignInLinkToEmail (package:firebase_auth/src/firebase_auth.dart:364:5) https://github.com/flutter/flutter/issues/4 FirebaseAuthenticationClient.sendLoginEmailLink (package:firebase_authentication_client/src/firebase_authentication_client.dart:219:7) https://github.com/flutter/flutter/issues/5 UserRepository.sendLoginEmailLink (package:user_repository/src/user_repository.dart:170:7) https://github.com/flutter/flutter/issues/6 LoginBloc._onSendEmailLinkSubmitted (package:antifacial_intelligence/login/bloc/login_bloc.dart:44:7) https://github.com/flutter/flutter/issues/7 Bloc.on..handleEvent (package:bloc/src/bloc.dart:226:13) ```
darshankawar commented 1 year ago

@partiallyanonymous1 Hi again :)

Although I have not used the news_toolkit feature yet, I see that there are lot of other / external tools being used in it, such as mason and other community packages per your flutter dependencies section details.

In order to properly address the issue, is it possible for you to narrow down the issue specific to firebase_auth plugin only in your current setup without using any third party community packages such as bloc and others ? Because the error log does seem to point to bloc library code:

#7      LoginBloc._onGoogleSubmitted (package:daily_globe/login/bloc/login_bloc.dart:60:7)
      <asynchronous suspension>
      #8      Bloc.on.<anonymous closure>.handleEvent (package:bloc/src/bloc.dart:226:13)
      <asynchronous suspension>

Also, since it works in production flavor, but not in dev flavor, have you confirmed if there's any config missing while setting up flavors ? Can you check if this guide helps in your case or not ?

partiallyanonymous1 commented 1 year ago

Problem 1: Cannot login with Sign in with Google on development flavor: Thank you! Following the guide you linked me, I noticed Sign in with google wasn’t actually enabled for the firebase project I made for the development flavor.

Problem 2: Cannot log in with email for any flavor: I am not sure how to narrow down the problem, but there are a few things I’ve had trouble doing that could be the source of the error. Perhaps you could help me do them successfully? In the Error Output below, you can see I added some print statements that get printed out as I/flutter…

I think the main problem MIGHT be that instead of the flutter news template allowing people to sign in or up via their email, it is trying to send people a passwordless email, but I’m not actually sure if this is problem or how to fix it if it is. (I address this below but first…)

First, i’ve seen a lot of posts for the error Ignoring header X-Firebase-Locale because its value was null. From this link: https://stackoverflow.com/questions/64727665/w-system-ignoring-header-x-firebase-locale-because-its-value-was-null I’m pretty sure i have the firebase log in with email properly enabled, and also I have the SHA-1 keys entered correctly since sign in with google works right? Also, the simulator must be connected to the internet or else how would sign in with google work? Plus, I’ve been able to browse with the chrome app fine.
Also, inside …\daily_globe\android\app\src\main\AndroidManifest.xml I added android:usesCleartextTraffic="true" so it now reads:

AndroidManifest.xml ``` ```

Currently, I do not have any user named e@e.com already in my firebase authentication userbase. Some things I haven’t done (maybe?) is successfully finish dynamic links setup or Activate Android Device Verification from and a few other solutions that don’t seem relevant. According to: https://stackoverflow.com/questions/68768127/flutter-ignoring-header-x-firebase-locale-because-its-value-was-null This wouldn’t be the cause of an actual error that prevents a user from signing in with email.

Finally, just in case the error stems from me not having enabled “ setup email link (passwordless sign-in)” I tried enabling that. It links me to these instructions: https://firebase.google.com/docs/auth/android/email-link-auth?hl=en&authuser=0&_gl=1*1lfj6fr*_ga*MTE2NjY2Njk0NS4xNjgwMzE1MTQy*_ga_CW55HF8NVT*MTY4OTAxNjkzMC42OS4xLjE2ODkwMTkyNjIuMC4wLjA. First, simply enabling email links in firebase doesn’t fix any problem. The error is identical. Also, in terms of doing the extra setup to get this working, well first of all, i just want normal sign in with email to work, no links. Is this possible to get? But also, it appears I need to set up dynamic links to get sign with email to work. When I go to set up dynamic links, it says this is being deprecated soon: https://firebase.google.com/support/dynamic-links-faq?hl=en&authuser=0&_gl=1*189urlv*_ga*MTE2NjY2Njk0NS4xNjgwMzE1MTQy*_ga_CW55HF8NVT*MTY4OTAyMTA3MS43MC4xLjE2ODkwMjE1MzkuMC4wLjA.

Anyways, I’m very confused. I don’t know exactly what’s happening whether the problem is that the app by default tries to do passwordless sign in and that isn’t enabled and if so how to change the default behavior, or how to enable passwordless sign in with email in firebase, or if either of those are the problem, or if there’s some third problem that isn’t either of those two. Okay. thank you very much darshankawar. I appreciate your help a lot. :)

Error Output ``` D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.pure(value: , isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e), nextState: LoginState(FormzInput.dirty(value: e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@), nextState: LoginState(FormzInput.dirty(value: e@, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } D/EGL_emulation( 7151): app_time_stats: avg=98.25ms min=10.51ms max=483.49ms count=12 D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e), nextState: LoginState(FormzInput.dirty(value: e@e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.), nextState: LoginState(FormzInput.dirty(value: e@e., isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e., isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.c), nextState: LoginState(FormzInput.dirty(value: e@e.c, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.c, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.co), nextState: LoginState(FormzInput.dirty(value: e@e.co, isValid: true, error: null), FormzSubmissionStatus.initial, true) } D/EGL_emulation( 7151): app_time_stats: avg=100.21ms min=14.50ms max=347.30ms count=10 D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.co, isValid: true, error: null), FormzSubmissionStatus.initial, true), event: LoginEmailChanged(e@e.com), nextState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.initial, true) } D/EGL_emulation( 7151): app_time_stats: avg=139.25ms min=14.66ms max=499.42ms count=8 I/flutter ( 7151): YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY I/flutter ( 7151): YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY I/flutter ( 7151): YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY I/flutter ( 7151): MY COMMENT:: about to try await channel.invokeMethod with email e@e.com I/flutter ( 7151): MY COMMENT:: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.initial, true), event: SendEmailLinkSubmitted(AnalyticsEvent(SendEmailLinkSubmitted, null)), nextState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.inProgress, true) } W/System ( 7151): Ignoring header X-Firebase-Locale because its value was null. D/EGL_emulation( 7151): app_time_stats: avg=3627.68ms min=6.02ms max=74597.16ms count=22 [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.inProgress, true), event: SendEmailLinkSubmitted(AnalyticsEvent(SendEmailLinkSubmitted, null)), nextState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.failure, true) } [log] onError LoginBloc Instance of 'SendLoginEmailLinkFailure' #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7) #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18) #2 MethodChannelFirebaseAuth.sendSignInLinkToEmail (package:firebase_auth_platform_interface/src/method_channel/method_channel_firebase_auth.dart:362:7) #3 FirebaseAuth.sendSignInLinkToEmail (package:firebase_auth/src/firebase_auth.dart:372:5) #4 FirebaseAuthenticationClient.sendLoginEmailLink (package:firebase_authentication_client/src/firebase_authentication_client.dart:219:7) #5 UserRepository.sendLoginEmailLink (package:user_repository/src/user_repository.dart:170:7) #6 LoginBloc._onSendEmailLinkSubmitted (package:daily_globe/login/bloc/login_bloc.dart:44:7) #7 Bloc.on..handleEvent (package:bloc/src/bloc.dart:226:13) D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT I/AssistStructure( 7151): Flattened final assist data: 520 bytes, containing 1 windows, 3 views D/InsetsController( 7151): show(ime(), fromIme=true) D/EGL_emulation( 7151): app_time_stats: avg=68.46ms min=20.31ms max=302.97ms count=15 ```
partiallyanonymous1 commented 1 year ago

Problem 1: Cannot login with Sign in with Google on development flavor: Thank you! Following the guide you linked me, I noticed Sign in with google wasn’t actually enabled for the firebase project I made for the development flavor.

Problem 2: Cannot log in with email for any flavor: I am not sure how to narrow down the problem, but there are a few things I’ve had trouble doing that could be the source of the error. Perhaps you could help me do them successfully? In the Error Output below, you can see I added some print statements that get printed out as I/flutter…

I think the main problem MIGHT be that instead of the flutter news template allowing people to sign in or up via their email, it is trying to send people a passwordless email, but I’m not actually sure if this is problem or how to fix it if it is. (I address this below but first…)

First, i’ve seen a lot of posts for the error Ignoring header X-Firebase-Locale because its value was null. From this link: https://stackoverflow.com/questions/64727665/w-system-ignoring-header-x-firebase-locale-because-its-value-was-null I’m pretty sure i have the firebase log in with email properly enabled, and also I have the SHA-1 keys entered correctly since sign in with google works right? Also, the simulator must be connected to the internet or else how would sign in with google work? Plus, I’ve been able to browse with the chrome app fine.
Also, inside …\daily_globe\android\app\src\main\AndroidManifest.xml I added android:usesCleartextTraffic="true" so it now reads:

AndroidManifest.xml ``` ```

Currently, I do not have any user named e@e.com already in my firebase authentication userbase. Some things I haven’t done (maybe?) is successfully finish dynamic links setup or Activate Android Device Verification from and a few other solutions that don’t seem relevant. According to: https://stackoverflow.com/questions/68768127/flutter-ignoring-header-x-firebase-locale-because-its-value-was-null This wouldn’t be the cause of an actual error that prevents a user from signing in with email.

Finally, just in case the error stems from me not having enabled “ setup email link (passwordless sign-in)” I tried enabling that. It links me to these instructions: https://firebase.google.com/docs/auth/android/email-link-auth?hl=en&authuser=0&_gl=1*1lfj6fr*_ga*MTE2NjY2Njk0NS4xNjgwMzE1MTQy*_ga_CW55HF8NVT*MTY4OTAxNjkzMC42OS4xLjE2ODkwMTkyNjIuMC4wLjA. First, simply enabling email links in firebase doesn’t fix any problem. The error is identical. Also, in terms of doing the extra setup to get this working, well first of all, i just want normal sign in with email to work, no links. Is this possible to get? But also, it appears I need to set up dynamic links to get sign with email to work. When I go to set up dynamic links, it says this is being deprecated soon: https://firebase.google.com/support/dynamic-links-faq?hl=en&authuser=0&_gl=1*189urlv*_ga*MTE2NjY2Njk0NS4xNjgwMzE1MTQy*_ga_CW55HF8NVT*MTY4OTAyMTA3MS43MC4xLjE2ODkwMjE1MzkuMC4wLjA.

Anyways, I’m very confused. I don’t know exactly what’s happening whether the problem is that the app by default tries to do passwordless sign in and that isn’t enabled and if so how to change the default behavior, or how to enable passwordless sign in with email in firebase, or if either of those are the problem, or if there’s some third problem that isn’t either of those two. Okay. thank you very much darshankawar. I appreciate your help a lot. :)

Error Output ``` D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.pure(value: , isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e), nextState: LoginState(FormzInput.dirty(value: e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@), nextState: LoginState(FormzInput.dirty(value: e@, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } D/EGL_emulation( 7151): app_time_stats: avg=98.25ms min=10.51ms max=483.49ms count=12 D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e), nextState: LoginState(FormzInput.dirty(value: e@e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.), nextState: LoginState(FormzInput.dirty(value: e@e., isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e., isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.c), nextState: LoginState(FormzInput.dirty(value: e@e.c, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false) } D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.c, isValid: false, error: EmailValidationError.invalid), FormzSubmissionStatus.initial, false), event: LoginEmailChanged(e@e.co), nextState: LoginState(FormzInput.dirty(value: e@e.co, isValid: true, error: null), FormzSubmissionStatus.initial, true) } D/EGL_emulation( 7151): app_time_stats: avg=100.21ms min=14.50ms max=347.30ms count=10 D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT D/InsetsController( 7151): show(ime(), fromIme=true) [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.co, isValid: true, error: null), FormzSubmissionStatus.initial, true), event: LoginEmailChanged(e@e.com), nextState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.initial, true) } D/EGL_emulation( 7151): app_time_stats: avg=139.25ms min=14.66ms max=499.42ms count=8 I/flutter ( 7151): YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY I/flutter ( 7151): YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY I/flutter ( 7151): YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY I/flutter ( 7151): MY COMMENT:: about to try await channel.invokeMethod with email e@e.com I/flutter ( 7151): MY COMMENT:: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.initial, true), event: SendEmailLinkSubmitted(AnalyticsEvent(SendEmailLinkSubmitted, null)), nextState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.inProgress, true) } W/System ( 7151): Ignoring header X-Firebase-Locale because its value was null. D/EGL_emulation( 7151): app_time_stats: avg=3627.68ms min=6.02ms max=74597.16ms count=22 [log] onTransition LoginBloc: Transition { currentState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.inProgress, true), event: SendEmailLinkSubmitted(AnalyticsEvent(SendEmailLinkSubmitted, null)), nextState: LoginState(FormzInput.dirty(value: e@e.com, isValid: true, error: null), FormzSubmissionStatus.failure, true) } [log] onError LoginBloc Instance of 'SendLoginEmailLinkFailure' #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7) #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18) #2 MethodChannelFirebaseAuth.sendSignInLinkToEmail (package:firebase_auth_platform_interface/src/method_channel/method_channel_firebase_auth.dart:362:7) #3 FirebaseAuth.sendSignInLinkToEmail (package:firebase_auth/src/firebase_auth.dart:372:5) #4 FirebaseAuthenticationClient.sendLoginEmailLink (package:firebase_authentication_client/src/firebase_authentication_client.dart:219:7) #5 UserRepository.sendLoginEmailLink (package:user_repository/src/user_repository.dart:170:7) #6 LoginBloc._onSendEmailLinkSubmitted (package:daily_globe/login/bloc/login_bloc.dart:44:7) #7 Bloc.on..handleEvent (package:bloc/src/bloc.dart:226:13) D/InputMethodManager( 7151): showSoftInput() view=io.flutter.embedding.android.FlutterView{f54f978 VFE...... .F...... 0,0-1080,2148 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT I/AssistStructure( 7151): Flattened final assist data: 520 bytes, containing 1 windows, 3 views D/InsetsController( 7151): show(ime(), fromIme=true) D/EGL_emulation( 7151): app_time_stats: avg=68.46ms min=20.31ms max=302.97ms count=15 ```
partiallyanonymous1 commented 1 year ago

sorry. i am new to posting questions on github, so i accidentally posted my response multiple times closing and reopening this thread. apologies.

darshankawar commented 1 year ago

I don’t know exactly what’s happening whether the problem is that the app by default tries to do passwordless sign in and that isn’t enabled and if so how to change the default behavior, or how to enable passwordless sign in with email in firebase, or if either of those are the problem

It seems to be the case. See https://flutter.github.io/news_toolkit/project_configuration/social_authentication/ and check if it helps further in your case.

google-oss-bot commented 1 year ago

Hey @partiallyanonymous1. 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.

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