angular / angular/angularfire

Two consecutive `subscribe` calls on the Observable created by `authState()` cause Angular app to never become stable.

Đang mở
#3,548 0 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
7.8k
Fork
2.2k
Merge trung bình
22 giờ 28 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Version info

**Angular:** 18.0.3

**Firebase:** 10.12.2

**AngularFire:** 18.0.1

### How to reproduce these conditions

**Failing test unit, Stackblitz demonstrating the problem**

Stackblitz example with the problem: https://stackblitz.com/edit/stackblitz-starters-zfidzt?file=src%2Fmain.ts

**Steps to set up and reproduce**

- Open Stackblitz reproduction
- Check the console, and see that the `ApplicationRef.isStable` never emits true

### Debug output

**Errors in the JavaScript console**

message: `isStable: true` is expected, but it never comes
![angular-fire-stability-example](https://github.com/angular/angularfire/assets/72603663/0672130f-9efe-4ff9-9c0c-923772eeab30)

### Expected behavior

`ApplicationRef.isStable` emits `true` after application start.
### Actual behavior

`ApplicationRef.isStable` never emits `true`, if two consecutive `subscribe` calls on the Observable created by `authState()` are made.

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

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

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết, đặc biệt là src/main.ts, và tái hiện hai lệnh gọi subscribe liên tiếp trên authState(). Quan sát ApplicationRef.isStable và so sánh kết quả với lần phát true dự kiến sau khi ứng dụng khởi động; được xem là hoàn tất khi ứng dụng trở nên ổn định trong bản tái hiện này.

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

Đánh giá

Công nghệ
angular, firebase, typescript
Lĩnh vực
authentication, frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

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.