Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[firebase_auth]: Phone Authentication - Missing Client Identifier on Android 14 #13349

Closed
1 task done
omar-hadek opened this issue Sep 17, 2024 · 1 comment
Closed
1 task done
Labels
Needs Attention This issue needs maintainer attention. platform: android Issues / PRs which are specifically for Android. plugin: auth resolution: user This was a user issue, e.g. invalid configuration or code. type: bug Something isn't working

Comments

@omar-hadek
Copy link

omar-hadek commented Sep 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

App Check, Auth

Which platforms are affected?

Android

Description

I'm encountering an issue with Firebase Phone Authentication. On a Redmi 13c running Android 14, I receive a "Missing client identifier" error during the authentication flow. The same code works perfectly on Android 13.

Reproducing the issue

Steps to reproduce the behavior:

  • Set up Firebase Phone Authentication with Flutter.
  • Sign the APK with a release keystore.
  • Test on Redmi 13c (Android 14) – Firebase Phone Auth fails with a missing client identifier error.
  • Test on Android 13 – Phone Auth works as expected.

Firebase Core version

3.4.1

Flutter Version

3.24.2

Relevant Log Output

Flutter Doctor Output:

[✓] Flutter (Channel stable, 3.24.2, on macOS 14.6.1 23G93 darwin-arm64, locale en-MA)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc3)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.78.2)
[✓] Connected device (4 available)
[✓] Network resources

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.5.2
Flutter SDK 3.24.2
lunch_pro 1.0.0+1

dependencies:
- clock 1.1.1
- cloud_firestore 5.4.1 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- collection 1.18.0
- cupertino_icons 1.0.8
- firebase_analytics 11.3.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_app_check 0.3.1+1 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 5.2.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 3.4.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_storage 12.3.0 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- freezed_annotation 2.4.4 [collection json_annotation meta]
- gaimon 1.3.2 [flutter]
- go_router 14.2.7 [collection flutter flutter_web_plugins logging meta]
- hooks_riverpod 2.5.2 [collection flutter flutter_hooks flutter_riverpod riverpod state_notifier]
- intl 0.19.0 [clock meta path]
- intl_phone_number_input 0.7.4 [flutter libphonenumber_plugin equatable collection]
- ionicons 0.2.2 [flutter]
- lucide_icons 0.257.0 [flutter]
- meta 1.15.0
- pinput 5.0.0 [flutter universal_platform]
- rxdart 0.28.0
- shared_preferences 2.3.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- smart_auth 2.0.0 [flutter flutter_web_plugins]

dev dependencies:
- build_runner 2.4.12 [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]
- flutter_launcher_icons 0.13.1 [args checked_yaml cli_util image json_annotation path yaml]
- flutter_lints 4.0.0 [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]
- freezed 2.5.7 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation dart_style]

transitive dependencies:
- _fe_analyzer_shared 72.0.0 [meta]
- _flutterfire_internals 1.3.42 [collection firebase_core firebase_core_platform_interface flutter meta]
- _macros 0.3.2
- analyzer 6.7.0 [_fe_analyzer_shared collection convert crypto glob macros meta package_config path pub_semver source_span watcher yaml]
- archive 3.6.1 [crypto path]
- args 2.5.0
- 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.2 [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.2 [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.2 [built_collection collection fixnum meta]
- characters 1.3.0
- checked_yaml 2.0.3 [json_annotation source_span yaml]
- cli_util 0.4.1 [meta path]
- cloud_firestore_platform_interface 6.4.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 4.3.0 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins]
- code_builder 4.10.0 [built_collection built_value collection matcher meta]
- convert 3.1.1 [typed_data]
- crypto 3.0.5 [typed_data]
- dart_style 2.3.7 [analyzer args collection package_config path pub_semver source_span]
- equatable 2.0.5 [collection meta]
- fake_async 1.3.1 [clock collection]
- ffi 2.1.3
- file 7.0.0 [meta path]
- firebase_analytics_platform_interface 4.2.3 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_analytics_web 0.5.10 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins]
- firebase_app_check_platform_interface 0.1.0+36 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_app_check_web 0.1.3 [_flutterfire_internals firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins web]
- firebase_auth_platform_interface 7.4.5 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.13.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web]
- firebase_core_platform_interface 5.2.1 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.18.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_storage_platform_interface 5.1.29 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_storage_web 3.10.0 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http meta web]
- fixnum 1.1.0
- flutter_hooks 0.20.5 [flutter]
- flutter_riverpod 2.5.1 [collection flutter meta riverpod state_notifier]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- frontend_server_client 4.0.0 [async path]
- glob 2.1.2 [async collection file path string_scanner]
- graphs 2.3.2 [collection]
- http 1.2.2 [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 4.2.0 [archive meta xml]
- io 1.0.4 [meta path string_scanner]
- js 0.6.7 [meta]
- json_annotation 4.9.0 [meta]
- leak_tracker 10.0.5 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.5 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.1 [leak_tracker matcher meta]
- libphonenumber_platform_interface 0.4.2 [flutter plugin_platform_interface]
- libphonenumber_plugin 0.3.3 [flutter flutter_web_plugins libphonenumber_platform_interface libphonenumber_web]
- libphonenumber_web 0.3.2 [flutter flutter_web_plugins js libphonenumber_platform_interface]
- lints 4.0.0
- logging 1.2.0
- macros 0.1.2-main.4 [_macros]
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- mime 1.0.6
- package_config 2.1.0 [path]
- path 1.9.0
- 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.3.0 [ffi flutter path path_provider_platform_interface]
- petitparser 6.0.2 [meta]
- platform 3.1.5
- plugin_platform_interface 2.1.8 [meta]
- pool 1.5.1 [async stack_trace]
- pub_semver 2.1.4 [collection meta]
- pubspec_parse 1.3.0 [checked_yaml collection json_annotation pub_semver yaml]
- riverpod 2.5.1 [collection meta stack_trace state_notifier]
- shared_preferences_android 2.3.2 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.5.2 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.4.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.4.1 [flutter plugin_platform_interface]
- shared_preferences_web 2.4.2 [flutter flutter_web_plugins shared_preferences_platform_interface web]
- shared_preferences_windows 2.4.1 [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 2.0.0 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.99
- source_gen 1.5.0 [analyzer async build dart_style glob path source_span yaml]
- source_span 1.10.0 [collection path term_glyph]
- stack_trace 1.11.1 [path]
- state_notifier 1.0.0 [meta]
- stream_channel 2.1.2 [async]
- stream_transform 2.1.0
- string_scanner 1.2.0 [source_span]
- term_glyph 1.2.1
- test_api 0.7.2 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- timing 1.0.1 [json_annotation]
- typed_data 1.3.2 [collection]
- universal_platform 1.1.0
- vector_math 2.1.4
- vm_service 14.2.5
- watcher 1.1.0 [async path]
- web 1.0.0
- web_socket 0.1.6 [web]
- web_socket_channel 3.0.1 [async crypto stream_channel web web_socket]
- 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

Expected Behavior

Phone Authentication should work as it does on Android 13, without throwing the missing client identifier error.

Details:

  • Device: Redmi 13c
  • Android Version: 14
  • Firebase Authentication SDK: Latest (using Firebase Phone Auth)
  • Flutter Version: 3.24.2 (Stable)

Key Configurations:

  • APK signing: Using a release keystore.
  • App Integrity: App Check with Google Play Integrity API enabled.
  • SHA Configuration: Both SHA-1 and SHA-256 keys are added in Firebase Project Settings and App Check.
@omar-hadek omar-hadek added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Sep 17, 2024
@SelaseKay SelaseKay added plugin: auth platform: android Issues / PRs which are specifically for Android. labels Sep 18, 2024
@Lyokone
Copy link
Contributor

Lyokone commented Oct 2, 2024

Hello @omar-hadek, I see that your device is a Redmi 13c. It may not come with Google Play Services installed by default which will impact the ability for the Phone Authentication to check for genuine request. Unfortunately, there is nothing that FlutterFire can do to mitigate that. If you feel like it's something that should be solved, you can open an issue at https://github.com/firebase/firebase-android-sdk

@Lyokone Lyokone closed this as completed Oct 2, 2024
@Lyokone Lyokone added the resolution: user This was a user issue, e.g. invalid configuration or code. label Oct 2, 2024
@firebase firebase locked and limited conversation to collaborators Nov 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs Attention This issue needs maintainer attention. platform: android Issues / PRs which are specifically for Android. plugin: auth resolution: user This was a user issue, e.g. invalid configuration or code. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants