angular / angular/angularfire

Any evocation of fireFunctions.httpsCallable make Angular Zone instable

Offen
#3,023 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
7.8k
Forks
2.2k
Ø Merge
22 Std. 28 Min.
Gemergte PRs (30 T.)
6

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduziere das Problem mit Angular 12.1.1, Firebase 9.1.3, AngularFire 7.1.0 und RxJS 7.2.0 unter Verwendung von AngularFireFunctions aus @angular/fire/compat/functions. Beginne bei httpsCallable und prüfe, wie sein Aufruf mit der Angular Zone interagiert, auch wenn er in ngZone.runOutsideAngular eingeschlossen ist. Als erledigt gilt die Aufgabe, wenn Aufrufe von callables keine langlebigen ausstehenden Tasks mehr hinterlassen oder die Zone instabil machen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, firebase, typescript
Bereich
cloud, frontend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.