Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#742 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
firebase, react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu từ preloadObservable và cache preloadedObservables toàn cục, sau đó truy vết hành vi lỗi và reset của SuspenseSubject thông qua đường dẫn trạng thái không-Suspense của hook. Hoàn tất khi một đường dẫn retry hoặc reset đã thống nhất cho phép một mục bị lỗi khôi phục với cùng observableId, mà không cần một ID khác hoặc workaround remount.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
3.6k
Fork
403
Merge trung bình
5 ngày 1 giờ
Pull request đã merge (30 ngày)
10

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của FirebaseExtended/reactfire

Tất cả issue của FirebaseExtended/reactfire

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.