angular / angular/angularfire

Any evocation of fireFunctions.httpsCallable make Angular Zone instable

未關閉
#3,023 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
7.8k
分支
2.2k
平均合併
22 小時 28 分鐘
30 天內合併 PR
6

描述

### 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.

貢獻指南

開啟貢獻指南

研究方向

使用來自 @angular/fire/compat/functions 的 AngularFireFunctions,在 Angular 12.1.1、Firebase 9.1.3、AngularFire 7.1.0 和 RxJS 7.2.0 中重現此問題。從 httpsCallable 開始,檢查其呼叫如何與 Angular Zone 互動,包括將其包裝在 ngZone.runOutsideAngular 中時的情況。當 callable 呼叫不再留下長時間存在的 pending task 或使 Zone 變得不穩定時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
angular, firebase, typescript
領域
cloud, frontend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。