angular / angular/angularfire

signout function in ngrx effect with()

Abierto
#3,251 6 comentarios 4 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
7.8k
Forks
2.2k
Merge medio
22 h 28 min
PR fusionados (30 d)
6

Descripción

Hello,
I have an NGRX in my project, and when I sign user out I got the error explained below, please notice that I use NGRX with:
```
runtimeChecks: {
strictStateImmutability: true,
strictActionImmutability: true,
},
```

### Version info

**Angular:**
~13.3.0
**Firebase:**
^9.1.0
**AngularFire:**
^7.2.1

### How to reproduce these conditions
auth.effects.ts:
```
clearLocalstorageOnLogout$ = createEffect(
() =>
this.actions$.pipe(
ofType(AuthActions.logout),
tap(async () => {
// @todo: there is a bug here
await this.firebaseAuth.signOut();
}),
),
{dispatch: false}
);

constructor(
private readonly actions$: Actions,
private firebaseAuth: Auth,
private router: Router,
) {
}
```

### Debug output

** Errors in the JavaScript console **
```
Unhandled Promise rejection: Cannot assign to read only property 'operations' of object '[object Object]' ; Zone: ; Task: Promise.then ; Value: TypeError: Cannot assign to read only property 'operations' of object '[object Object]'

Unhandled Promise rejection: Cannot assign to read only property 'isRunning' of object '[object Object]' ; Zone: ; Task: Promise.then ; Value: TypeError: Cannot assign to read only property 'isRunning' of object '[object Object]'
```
** Screenshots **
Screen Shot 1444-01-05 at 9 35 49 PM
Screen Shot 1444-01-05 at 9 35 41 PM

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con auth.effects.ts, especialmente con clearLocalstorageOnLogout$, su pipeline de createEffect y la llamada a firebaseAuth.signOut(); reproduce el flujo de logout con las versiones indicadas de Angular, Firebase y AngularFire y las comprobaciones de ejecución habilitadas. El trabajo estará terminado cuando el flujo de signout se complete sin los errores read-only-property o unhandled-promise reportados.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, firebase, typescript
Área
authentication, frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.