angular / angular/angularfire

docData observable stream emits identical object values multiple times in a row

Aperta
#3,564 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
7.8k
Fork
2.2k
Merge medio
22h 28m
PR unite (30g)
6

Descrizione

### Version info

**Angular:** ^18.0.0

**Firebase:** ^10.13.0

**AngularFire:** ^18.0.1

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

"@ionic/angular": "^8.0.0",

Tested on MacOS Chrome, but reproducible elsewhere. Else let me know.

### How to reproduce these conditions

Simply press the update button after strating this project, it will update the game entity and make it emit twice:
https://github.com/folsze/firebase-observable-double-emission

here is a related stackoverflow post that I created:

https://stackoverflow.com/questions/78891192/firebase-docdata-stream-emits-identical-object-values-multiple-times-in-a-row

**Steps to set up and reproduce**

run with package json npm run

then simply press the update button, it will update the game entity and make it emit twice:

### Debug output

image

** Output from `firebase.database().enableLogging(true);` **
<- I have no idea what this is suppoed to do for me. I added this but receive no logs:

import { enableLogging } from '@angular/fire/database';

enableLogging(true);

### Expected behavior

It only emits once

### Actual behavior

it emits multiple times (twice currently for this simple scenario):

image

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dal progetto di riproduzione collegato firebase-observable-double-emission e dai suoi package scripts; eseguilo e premi il pulsante di aggiornamento per osservare lo stream docData. Confronta le emissioni identiche ripetute con l’emissione singola prevista, usando come contesto la discussione di Stack Overflow fornita e la nota sul logging.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, firebase, typescript
Ambito
database, frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.