Open mauriciotogneri opened 8 months ago
Hey @mauriciotogneri - do you also see this behaviour on other SDKs (e.g. iOS and web) or is it just android?
It does appear that the SDK client should update the locale according to the documentation: https://firebase.google.com/docs/auth/extend-with-blocking-functions?gen=2nd#getting_user_and_context_information
I just double checked and we are correctly setting the language code on the firebase android SDK here: https://github.com/firebase/flutterfire/blob/master/packages/firebase_auth/firebase_auth/android/src/main/java/io/flutter/plugins/firebase/auth/FlutterFirebaseAuthPlugin.java#L553
For reference, "und" means undetermined.
Hi @russellwheatley
My colleague told me that in iOS, either if he sets the language or not, it works in the backend (e.g. the locale field is correctly set in the blocking function event parameter).
Maybe is not the way the language is set but the way the value is sent in the request. Let me know what I can do on my side to test other approaches.
@mauriciotogneri - it seems like a bug in firebase android sdk, possibly not sending the language code in a request header or something similar. It is documented that it should work if the language code is set on the SDK and it works on iOS. Do you mind creating a full, minimal reproduction repo with instructions on reproducing so we can send it to the firebase android team for fixing, please? Reproductions are prioritised so it should expedite the process. Thanks.
Hi @russellwheatley
Here is a small repo I created with the frontend and backend part to reproduce the issue: https://github.com/mauriciotogneri/firebase_auth_bug
Let me know if you need more information.
@russellwheatley Any news about this issue?
Thank you for reproduction. I've escalated to the firebase-android-sdk, it appears to be a bug there: https://github.com/firebase/firebase-android-sdk/issues/5825
Hi @russellwheatley, any updates on this issue?
@mauriciotogneri - no updates I'm afraid, it is best tracking the issue on the Firebase android sdk as that is where the bug occurring 🙏
@russellwheatley The Firebase Android SDK team is not responding on that issue and the bug is starting to become annoying for us. Is there another channel I can push that bug? What do you recommend?
@russellwheatley Any news?
@mauriciotogneri - not in regards to the FlutterFire SDK, waiting on fix in Firebase Android SDK 🙏
Is there an existing issue for this?
Which plugins are affected?
Auth
Which platforms are affected?
Android
Description
Before I signup with the Firebase Auth SDK (
createUserWithEmailAndPassword
), I'm setting the language using:However, in the blocking function in the backend, the
locale
field is set tound
:The problem occurs even if I don't set the language code with the SDK.
Reproducing the issue
beforeUserCreated
blocking function, check the value ofevent.locale
Firebase Core version
2.27.0
Flutter Version
3.19.3
Relevant Log Output
No response
Flutter dependencies
Expand
Flutter dependencies
snippet```yaml Dart SDK 3.3.1 Flutter SDK 3.19.3 dependencies: - app_settings 5.1.1 [flutter plugin_platform_interface] - better_open_file 3.6.5 [flutter ffi] - cached_network_image 3.3.1 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image] - cloud_firestore 4.15.8 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_functions 4.6.8 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter] - dafluta 5.3.0 [flutter] - device_info_plus 9.1.2 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta win32 win32_registry] - devicelocale 0.7.1 [flutter flutter_web_plugins] - dio 5.4.1 [async http_parser meta path] - event_bus 2.0.0 - file_picker 6.0.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32] - firebase_analytics 10.8.9 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_app_check 0.2.1+17 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 4.17.8 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.27.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 3.4.18 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_messaging 14.7.19 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_performance 0.9.3+17 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter] - firebase_remote_config 4.3.17 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - firebase_storage 11.6.9 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - fl_chart 0.66.2 [equatable flutter] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_downloader 1.11.6 [flutter] - flutter_inappwebview 6.0.0 [flutter flutter_inappwebview_platform_interface flutter_inappwebview_android flutter_inappwebview_ios flutter_inappwebview_macos flutter_inappwebview_web] - flutter_keyboard_visibility 6.0.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_linux flutter_keyboard_visibility_macos flutter_keyboard_visibility_web flutter_keyboard_visibility_windows flutter] - flutter_local_notifications 17.0.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 vector_math] - flutter_markdown 0.6.22 [flutter markdown meta path] - flutter_svg 2.0.10+1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler] - get_it 7.6.7 [async collection] - google_fonts 6.2.1 [flutter http path_provider crypto] - iban 1.0.1 [mod97] - image_picker 1.0.7 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows] - in_app_update 4.2.2 [flutter] - json_annotation 4.8.1 [meta] - jwt_decoder 2.0.1 - local_auth 2.2.0 [flutter local_auth_android local_auth_darwin local_auth_platform_interface local_auth_windows] - logger 2.1.0 - lottie 3.1.0 [archive flutter http path vector_math] - open_mail_app 0.4.5 [platform url_launcher flutter] - package_info_plus 5.0.1 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32] - path_provider 2.1.2 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - permission_handler 11.3.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_html permission_handler_windows permission_handler_platform_interface] - pinput 4.0.0 [flutter smart_auth universal_platform] - qr_code_scanner 1.0.1 [js flutter flutter_web_plugins] - screen_lock_check 2.0.1 [flutter] - shake_detector 0.1.2 [flutter sensors_plus] - share_plus 7.2.2 [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] - shared_preferences 2.2.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - swipable_stack 2.0.0 [flutter sprung] - uni_links2 0.6.0+2 [uni_links2_platform_interface uni_links_web2 flutter] - url_launcher 6.2.5 [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.4.8 [analyzer args async 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] - daassets 1.5.0 [yaml] - dalocale 2.5.0 [collection path] - dapublock 1.1.0 [yaml] - daunused 1.6.1 - flutter_lints 3.0.1 [lints] - flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service] - integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service async boolean_selector characters clock collection fake_async file leak_tracker leak_tracker_flutter_testing leak_tracker_testing matcher material_color_utilities meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api vector_math webdriver] - json_serializable 6.7.1 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] transitive dependencies: - _fe_analyzer_shared 67.0.0 [meta] - _flutterfire_internals 1.3.25 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 6.4.1 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.4.10 [crypto path pointycastle] - args 2.4.2 - async 2.11.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - build 2.4.1 [analyzer async convert crypto glob logging meta package_config path] - build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 4.0.1 [built_collection built_value crypto http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.4.2 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml] - build_runner_core 7.3.0 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta package_config path pool timing watcher yaml] - built_collection 5.1.1 - built_value 8.9.1 [built_collection collection fixnum meta] - cached_network_image_platform_interface 4.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.1.1 [cached_network_image_platform_interface flutter flutter_cache_manager] - characters 1.3.0 - checked_yaml 2.0.3 [json_annotation source_span yaml] - clock 1.1.1 - cloud_firestore_platform_interface 6.1.9 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.10.8 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - cloud_functions_platform_interface 5.5.19 [firebase_core flutter meta plugin_platform_interface] - cloud_functions_web 4.7.2 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js web] - code_builder 4.10.0 [built_collection built_value collection matcher meta] - collection 1.18.0 - convert 3.1.1 [typed_data] - cross_file 0.3.3+8 [meta web] - crypto 3.0.3 [typed_data] - dart_style 2.3.6 [analyzer args collection path pub_semver source_span] - dbus 0.7.10 [args ffi meta xml] - device_info_plus_platform_interface 7.0.0 [flutter meta plugin_platform_interface] - equatable 2.0.5 [collection meta] - fake_async 1.3.1 [clock collection] - ffi 2.1.2 - file 7.0.0 [meta path] - file_selector_linux 0.9.2+1 [cross_file file_selector_platform_interface flutter] - file_selector_macos 0.9.3+3 [cross_file file_selector_platform_interface flutter] - file_selector_platform_interface 2.6.2 [cross_file flutter http plugin_platform_interface] - file_selector_windows 0.9.3+1 [cross_file file_selector_platform_interface flutter] - firebase_analytics_platform_interface 3.9.9 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.5+21 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_app_check_platform_interface 0.1.0+19 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_app_check_web 0.1.0+19 [_flutterfire_internals firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 7.1.8 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.9.8 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser js meta web] - firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.11.5 [firebase_core_platform_interface flutter flutter_web_plugins js meta web] - firebase_crashlytics_platform_interface 3.6.25 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.5.27 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.6.8 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta web] - firebase_performance_platform_interface 0.1.4+25 [_flutterfire_internals firebase_core flutter plugin_platform_interface] - firebase_performance_web 0.1.4+25 [_flutterfire_internals firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js] - firebase_remote_config_platform_interface 1.4.25 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.4.25 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js] - firebase_storage_platform_interface 5.1.12 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.7.3 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta web] - fixnum 1.1.0 - flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver async boolean_selector characters clock collection leak_tracker leak_tracker_flutter_testing leak_tracker_testing matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api vector_math] - flutter_inappwebview_android 1.0.13 [flutter flutter_inappwebview_platform_interface] - flutter_inappwebview_internal_annotations 1.1.1 - flutter_inappwebview_ios 1.0.13 [flutter flutter_inappwebview_platform_interface] - flutter_inappwebview_macos 1.0.11 [flutter flutter_inappwebview_platform_interface] - flutter_inappwebview_platform_interface 1.0.10 [flutter flutter_inappwebview_internal_annotations plugin_platform_interface] - flutter_inappwebview_web 1.0.8 [flutter flutter_web_plugins js flutter_inappwebview_platform_interface] - flutter_keyboard_visibility_linux 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_keyboard_visibility_macos 1.0.0 [flutter_keyboard_visibility_platform_interface 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_keyboard_visibility_windows 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_local_notifications_linux 4.0.0+1 [dbus ffi flutter flutter_local_notifications_platform_interface path xdg_directories] - flutter_local_notifications_platform_interface 7.0.0+1 [flutter plugin_platform_interface] - flutter_plugin_android_lifecycle 2.0.17 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math] - frontend_server_client 3.2.0 [async path] - fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform] - glob 2.1.2 [async collection file path string_scanner] - graphs 2.3.1 [collection] - http 1.2.0 [async http_parser meta web] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - image_picker_android 0.8.9+3 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 3.0.2 [flutter flutter_web_plugins image_picker_platform_interface mime] - image_picker_ios 0.8.9+2 [flutter image_picker_platform_interface] - image_picker_linux 0.2.1+1 [file_selector_linux file_selector_platform_interface flutter image_picker_platform_interface] - image_picker_macos 0.2.1+1 [file_selector_macos file_selector_platform_interface flutter image_picker_platform_interface] - image_picker_platform_interface 2.9.4 [cross_file flutter http plugin_platform_interface] - image_picker_windows 0.2.1+1 [file_selector_platform_interface file_selector_windows flutter image_picker_platform_interface] - intl 0.18.1 [clock meta path] - io 1.0.4 [meta path string_scanner] - js 0.6.7 [meta] - leak_tracker 10.0.0 [clock collection meta path vm_service] - leak_tracker_flutter_testing 2.0.1 [flutter leak_tracker leak_tracker_testing matcher meta] - leak_tracker_testing 2.0.1 [leak_tracker matcher meta] - lints 3.0.0 - local_auth_android 1.0.37 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface] - local_auth_darwin 1.2.2 [flutter intl local_auth_platform_interface] - local_auth_platform_interface 1.0.10 [flutter plugin_platform_interface] - local_auth_windows 1.0.10 [flutter local_auth_platform_interface] - logging 1.2.0 - markdown 7.2.2 [args meta] - matcher 0.12.16+1 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.8.0 [collection] - meta 1.11.0 - mime 1.0.5 - mod97 1.0.0 - octo_image 2.0.0 [flutter] - package_config 2.1.0 [path] - package_info_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - path 1.9.0 - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.2.2 [flutter path_provider_platform_interface] - path_provider_foundation 2.3.2 [flutter path_provider_platform_interface] - path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_platform_interface 2.1.2 [flutter platform plugin_platform_interface] - path_provider_windows 2.2.1 [ffi flutter path path_provider_platform_interface win32] - permission_handler_android 12.0.5 [flutter permission_handler_platform_interface] - permission_handler_apple 9.4.1 [flutter permission_handler_platform_interface] - permission_handler_html 0.1.1 [flutter flutter_web_plugins permission_handler_platform_interface] - permission_handler_platform_interface 4.2.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.2.1 [flutter permission_handler_platform_interface] - petitparser 6.0.2 [meta] - platform 3.1.4 - plugin_platform_interface 2.1.8 [meta] - pointycastle 3.7.4 [collection convert js] - pool 1.5.1 [async stack_trace] - process 5.0.2 [file path platform] - pub_semver 2.1.4 [collection meta] - pubspec_parse 1.2.3 [checked_yaml collection json_annotation pub_semver yaml] - rxdart 0.27.7 - sensors_plus 4.0.2 [flutter flutter_web_plugins sensors_plus_platform_interface] - sensors_plus_platform_interface 1.2.0 [flutter logging meta plugin_platform_interface] - share_plus_platform_interface 3.3.1 [cross_file flutter meta mime plugin_platform_interface path_provider uuid] - shared_preferences_android 2.2.1 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.3.5 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.3.2 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_platform_interface 2.3.2 [flutter plugin_platform_interface] - shared_preferences_web 2.2.2 [flutter flutter_web_plugins shared_preferences_platform_interface web] - shared_preferences_windows 2.3.2 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.4.1 [async collection http_parser path stack_trace stream_channel] - shelf_web_socket 1.0.4 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - smart_auth 2.0.0 [flutter flutter_web_plugins] - source_gen 1.5.0 [analyzer async build dart_style glob path source_span yaml] - source_helper 1.3.4 [analyzer collection source_gen] - source_span 1.10.0 [collection path term_glyph] - sprintf 7.0.0 - sprung 3.0.1 [flutter] - sqflite 2.3.2 [flutter sqflite_common path] - sqflite_common 2.5.4 [synchronized path meta] - stack_trace 1.11.1 [path] - stream_channel 2.1.2 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - sync_http 0.3.1 - synchronized 3.1.0+1 - term_glyph 1.2.1 - test_api 0.6.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph] - timezone 0.9.2 [path] - timing 1.0.1 [json_annotation] - typed_data 1.3.2 [collection] - uni_links2_platform_interface 1.0.0+2 [plugin_platform_interface flutter] - uni_links_web2 0.1.0+2 [uni_links2_platform_interface flutter flutter_web_plugins] - universal_platform 1.0.0+1 - url_launcher_android 6.3.0 [flutter url_launcher_platform_interface] - url_launcher_ios 6.2.5 [flutter url_launcher_platform_interface] - url_launcher_linux 3.1.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.1.0 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface] - url_launcher_web 2.2.3 [flutter flutter_web_plugins url_launcher_platform_interface web] - url_launcher_windows 3.1.1 [flutter url_launcher_platform_interface] - uuid 4.3.3 [crypto sprintf meta fixnum] - vector_graphics 1.1.11+1 [flutter http vector_graphics_codec] - vector_graphics_codec 1.1.11+1 - vector_graphics_compiler 1.1.11+1 [args meta path_parsing xml vector_graphics_codec path] - vector_math 2.1.4 - vm_service 13.0.0 - watcher 1.1.0 [async path] - web 0.4.2 - web_socket_channel 2.4.3 [async crypto stream_channel web] - webdriver 3.0.3 [matcher path stack_trace sync_http] - win32 5.3.0 [ffi] - win32_registry 1.1.2 [ffi win32] - xdg_directories 1.0.4 [meta path] - xml 6.5.0 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] ```
Additional context and comments
No response