angular / angular/angularfire

Two consecutive `subscribe` calls on the Observable created by `authState()` cause Angular app to never become stable.

Aberta
#3,548 0 comentários 2 reações 0 responsáveis Ver no GitHub
Linguagem predominante
TypeScript
Estrelas
7.8k
Forks
2.2k
Merge médio
22h 28min
PRs com merge (30d)
6

Descrição

### Version info

**Angular:** 18.0.3

**Firebase:** 10.12.2

**AngularFire:** 18.0.1

### How to reproduce these conditions

**Failing test unit, Stackblitz demonstrating the problem**

Stackblitz example with the problem: https://stackblitz.com/edit/stackblitz-starters-zfidzt?file=src%2Fmain.ts

**Steps to set up and reproduce**

- Open Stackblitz reproduction
- Check the console, and see that the `ApplicationRef.isStable` never emits true

### Debug output

**Errors in the JavaScript console**

message: `isStable: true` is expected, but it never comes
![angular-fire-stability-example](https://github.com/angular/angularfire/assets/72603663/0672130f-9efe-4ff9-9c0c-923772eeab30)

### Expected behavior

`ApplicationRef.isStable` emits `true` after application start.
### Actual behavior

`ApplicationRef.isStable` never emits `true`, if two consecutive `subscribe` calls on the Observable created by `authState()` are made.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece pela reprodução vinculada do StackBlitz, especialmente por src/main.ts, e reproduza as duas chamadas consecutivas a subscribe em authState(). Observe ApplicationRef.isStable e compare o resultado com a emissão true esperada após a inicialização da aplicação; considera-se concluído quando a aplicação se torna estável nesta reprodução.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
angular, firebase, typescript
Domínio
authentication, frontend
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.