[firebase-auth] Blocking function timeout returns UNKNOWN error code (code 47) instead of a dedicated timeout code

オープン
#7,862 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
android, java

調査の方向性

まず、Android SDK が beforeUserCreated および createUserWithEmailAndPassword の実行中にブロッキング関数のタイムアウトをどのように処理するかを追跡します。これには、UNKNOWN/エラーコード 47 になる箇所も含まれます。既存の認証エラーマッピングを比較し、専用のタイムアウトコードを導入する範囲を判断します。Android Auth のコンシューマーがタイムアウトによる失敗を一般的な内部エラーと区別できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

api: auth needs-attention

Description

When a Firebase Auth blocking function (e.g. beforeUserCreated) times out, the Android SDK throws an error with code UNKNOWN (error code 47) instead of a dedicated, meaningful error code.

This makes it impossible for developers to programmatically distinguish between a genuine internal error and a blocking function timeout, leading to hours of debugging.

Steps to Reproduce

  1. Set up a beforeUserCreated blocking function that takes longer than the allowed timeout.
  2. Call createUserWithEmailAndPassword (or any auth method guarded by the blocking function) from an Android app.
  3. Observe the exception: it surfaces as UNKNOWN / error code 47 with a generic message like "An internal error has occurred."

Expected Behavior

A dedicated error code (e.g. BLOCKING_FUNCTION_TIMEOUT or similar) should be returned so that developers can handle this case explicitly.

Actual Behavior

The error is surfaced as UNKNOWN (error code 47):

Error code: 47
Message: An internal error has occurred.

From Flutter/FlutterFire (where this was originally reported):

[firebase_auth/unknown] An internal error has occurred. [ Error code:47
FirebaseAuthException
Firebase Auth error code: unknown
Firebase Auth error message: An internal error has occurred. [ Error code:47

Context

This was reported on the FlutterFire repository: https://github.com/firebase/flutterfire/issues/18022

The FlutterFire maintainer confirmed that error codes and messages are passed through as-is from the native Android SDK, and recommended opening this issue upstream to request a dedicated error code for blocking function timeouts.

A dedicated error code would benefit all Firebase Auth consumers on Android (native and cross-platform via FlutterFire, React Native Firebase, etc.).

Platform

  • Android (Firebase Auth Android SDK)
  • Also surfaced via FlutterFire (Flutter wrapper)
主要言語
Java
スター
2.6k
フォーク
733
平均マージ
2日 15時間
マージ済み PR(30日)
72

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/firebase-android-sdk のほかの issue

firebase/firebase-android-sdk の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。