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

Aperta
#7,862 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
android, java

Direzione di ricerca

Inizia tracciando come Android SDK gestisce il timeout di una funzione bloccante durante beforeUserCreated e createUserWithEmailAndPassword, incluso il punto in cui diventa UNKNOWN/codice errore 47. Confronta le mappature degli errori di autenticazione esistenti e determina l’ambito dell’introduzione di un codice di timeout dedicato. Il lavoro è completato quando i fallimenti dovuti a timeout possono essere distinti dagli errori interni generici per i consumer di Android Auth.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)
Lingua principale
Java
Stelle
2.6k
Fork
733
Merge medio
2g 15h
PR unite (30g)
72

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/firebase-android-sdk

Tutte le issue di firebase/firebase-android-sdk

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.