angular / angular/angularfire

Any evocation of fireFunctions.httpsCallable make Angular Zone instable

Đang mở
#3,023 2 bình luận 0 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:**
12.1.1

**Firebase:**
9.1.3

**AngularFire:**
7.1.0

**Other (e.g. Ionic/Cordova, Node, browser, operating system):**
rxjs: 7.2.0

### How to reproduce these conditions

Any evocation of `fireFunctions.httpsCallable` make Angular Zone instable.

**Context**

In my angular application, I have a code that detects pending tasks executed inside Angular Zone. I noticed after upgrade on 7.1.0 that evocation of httpCallables leave long living tasks in the Zone. This was never an issue before. Even wrapping those calls into `ngZone.runOutsideAngular` doesn't help. Example:

```typescript
import {AngularFireFunctions} from '@angular/fire/compat/functions';
//...
constructor(private readonly fireFunctions: AngularFireFunctions) {
}

this.fireFunctions.httpsCallable('myFunc')(data); // this code creates a long living task inside zone and make it unstable

```

### Expected behavior

Evocation of httpCallable functions must not make zone unstable.

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

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

Hướng nghiên cứu

Tái hiện vấn đề với Angular 12.1.1, Firebase 9.1.3, AngularFire 7.1.0 và RxJS 7.2.0 bằng cách sử dụng AngularFireFunctions từ @angular/fire/compat/functions. Bắt đầu từ httpsCallable và kiểm tra cách việc gọi nó tương tác với Angular Zone, bao gồm cả khi được bọc trong ngZone.runOutsideAngular. Được xem là hoàn tất khi các lần gọi callable không còn để lại các task pending tồn tại lâu hoặc khiến Zone trở nên không ổn định.

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
cloud, 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
35/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.