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 摘要。