angular / angular/angularfire

signout function in ngrx effect with()

オープン
#3,251 コメント 6 件 リアクション 4 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
7.8k
フォーク
2.2k
平均マージ
22時間 28分
マージ済み PR(30日)
6

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

auth.effects.tsから始め、特にclearLocalstorageOnLogout$、そのcreateEffectパイプライン、firebaseAuth.signOut();の呼び出しを確認し、記載されているAngular、Firebase、AngularFireのバージョンと有効なランタイムチェックを使用してログアウトフローを再現します。完了条件は、報告されているread-only-propertyまたはunhandled-promiseエラーなしにsignoutフローが完了することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, firebase, typescript
領域
authentication, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。