signout function in ngrx effect with()
- Dominant language
- TypeScript
- Stars
- 7.8k
- Forks
- 2.2k
- Avg merge
- 22h 28m
- Merged PRs (30d)
- 6
Description
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 **

Contributor guide
Research direction
Start with auth.effects.ts, especially clearLocalstorageOnLogout$, its createEffect pipeline, and the call to firebaseAuth.signOut(); reproduce the logout flow with the listed Angular, Firebase, and AngularFire versions and runtime checks enabled. Done means the signout flow completes without the reported read-only-property or unhandled-promise errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, firebase, typescript
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100