Skip to content

[firebase_auth] Blocking function error code is SCREAMING_SNAKE_CASE on Android instead of kebab-case #18020

@k-nkmr

Description

@k-nkmr

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Auth

Which platforms are affected?

Android

Description

When a blocking cloud function throws an HttpsError, the FirebaseAuthException.code returned to Flutter differs between iOS and Android:

  • iOS: blocking-cloud-function-returned-error (kebab-case)
  • Android: BLOCKING_FUNCTION_ERROR_RESPONSE (SCREAMING_SNAKE_CASE)

All other FirebaseAuthException.code values use kebab-case consistently across platforms. This inconsistency forces developers to handle both formats:

Reproducing the issue

  1. Set up a blocking cloud function (e.g. beforeUserSignedIn) that throws an HttpsError
  2. Trigger sign-in from both iOS and Android
  3. Catch the FirebaseAuthException and inspect e.code
  4. iOS returns blocking-cloud-function-returned-error (kebab-case)
  5. Android returns BLOCKING_FUNCTION_ERROR_RESPONSE (SCREAMING_SNAKE_CASE)

Firebase Core version

4.4.0

Flutter Version

3.38.5

Relevant Log Output

Flutter dependencies

firebase_auth: 6.1.4
firebase_auth_platform_interface: 8.1.6
firebase_auth_web: 6.1.2
firebase_core: 4.4.0
firebase_core_platform_interface: 6.0.2

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions