angular / angular/angularfire

createUserWithEmailAndPassword exception propagates to global handler

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

説明

### Version info

**Angular:**
angular/core: "~13.1.0",

**Firebase:**
"firebase": "^9.6.3",

**AngularFire:**
angular/fire: "^7.2.0",

**Other (e.g. Ionic/Cordova, Node, browser, operating system):**
Windows 10, Node.js v16.13.2., Edge and Chrome, latest version

### How to reproduce these conditions
Using the ``compat`` layer

```
import {AngularFireAuth} from '@angular/fire/compat/auth';
// etc

// choose an email address that is already in use, this throws the exception auth/email-already-in-use as expected
this.angularFireAuth.createUserWithEmailAndPassword(email, passwd).then((userCredential) => {
// user create was successful
}).catch((error) => {
console.log(error);
// even though we catch auth/email-already-in-use
// the error still propagates to the global error handler
// and appears on the console
// see the screenshot
});
```

See [this thread on stackoverflow where the question was asked already](https://stackoverflow.com/questions/67580158/cant-catch-exception-in-angularfireauth)

** Screenshots **
image

### Expected behavior

The exception that is caught in the catch block should not make its way to the global error handler

### Actual behavior

The exception that we caught in the catch block still propagates up to the global error handler

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

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

調査の方向性

@angular/fire/compat/auth のエントリーポイントから開始し、すでに登録されているメールアドレスを使って createUserWithEmailAndPassword で問題を再現します。捕捉された auth/email-already-in-use エラーを追跡し、promise catch の動作をグローバルエラーハンドラーと比較します。捕捉された例外がグローバルエラーハンドラーやコンソールに到達しなくなれば完了です。

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

評価

技術スタック
angular, firebase, typescript
領域
authentication, frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

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

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