FirebaseError when using fakeAsync
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- angular, firebase, typescript
- Ambito
- authentication, testing
Direzione di ricerca
Inizia con il codice recover-email fornito e il relativo test fakeAsync, quindi esamina come recoverEmail$ raggiunge Firebase Auth checkActionCode mentre l’emulatore localhost è in esecuzione. Riproduci il fallimento con tick(600) e flush(); fatto significa che il test viene completato correttamente con fakeAsync senza auth/network-request-failed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I'm seeing Firebase: Error (auth/network-request-failed) when using fakeAsync, but success without using it. (While using the emulator on localhost during test runs.)
it('should recover email fakeAsync', fakeAsync((): void => {
console.log('START');
service.recoverEmail$(testOobCode).subscribe({
error: fail,
next: (data: RecoverEmailResults): void => {
expect(data).withContext('RecoverEmailResults').toEqual({
passwordResetSent: true,
restoredEmail: testOriginalEmail,
successful: true,
});
},
});
tick(600);
flush(); // Makes the promises actually settle within the test lifetime.
console.log('END');
}));
recoverEmail$ is calling checkActionCode (and applyActionCode, but it doesn't get there) from Firebase. (@angular/fire/auth wrappers, current 19.0.0 version). Best I can tell firebase just uses browser fetch, but I cannot find any reports of problems with fakeAsync and fetch (possibly due to the commonness of the word fetch in code discussions).
Full code is here: https://github.com/rgant/brainfry/tree/main/src/app/identity/recover-email
- Lingua principale
- TypeScript
- Stelle
- 7.8k
- Fork
- 2.2k
- Merge medio
- 22h 34m
- PR unite (30g)
- 4
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di angular/angularfire
-
comp: firestore comp: ssr priority: P0 (critical) type: feature version: current (v17+)
angular/angularfire#3757 · 1 assegnatario ·
-
Six `firebase` entry points have no `@angular/fire` equivalent, so their exports are unreachable Apertacomp: core type: feature
angular/angularfire#3755 · 1 assegnatario ·
-
comp: auth comp: ssr comp: zones type: bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
angular/angularfire#3748 ·
-
Angular 22 release please Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
angular/angularfire#3737 · 17 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
angular/angularfire#3715 ·