Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Error recovery: no retry path once an observable cache entry errors

Aperta
#742 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
firebase, react, typescript
Ambito
frontend

Direzione di ricerca

Inizia da preloadObservable e dalla cache globale preloadedObservables, quindi traccia il comportamento di errore e reset di SuspenseSubject attraverso il percorso di stato non-Suspense dell’hook. Il lavoro è completato quando un percorso di retry o reset concordato consente a una voce in errore di recuperare mantenendo lo stesso observableId, senza richiedere un ID diverso o un workaround di remount.

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

Descrizione

v5

Problem

Once a reactfire hook enters status: 'error', there is no way to recover without remounting with a different observableId.

The errored SuspenseSubject stays in the global preloadedObservables cache under its observableId. On error, the 30-second reset timer is cancelled (it becomes a no-op timeout), and the observable does not re-subscribe. A component that remounts with the same observableId rejoins the same errored subject and immediately receives status: 'error' again.

This became user-visible in v4.3.0, which made status: 'error' reachable in non-suspense mode (previously errors always threw, so the stuck state was hidden). Users building status === 'error' UI now have no way to trigger a retry.

Current workaround

Change the observableId passed to the hook. This causes preloadObservable to create a fresh SuspenseSubject and re-subscribe to the source. Not a real API — just an escape hatch.

What a fix might look like

  • An explicit retry() / reset() function returned from the hook, or
  • A retryOnError option that re-subscribes automatically after a delay, or
  • Cache eviction on error after the reset timeout (restoring the pre-v4.3 behavior for the cache entry, not for error surfacing)

The right shape is an open question. Filing to track the gap.

Closes none. Related to #735.

Lingua principale
TypeScript
Stelle
3.6k
Fork
403
Merge medio
5g 1h
PR unite (30g)
10

Guida per i contributori

Apri la guida per i contributori

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 FirebaseExtended/reactfire

Tutte le issue di FirebaseExtended/reactfire

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.