[Bug] Errors fail to return all data from error object.
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- cpp, javascript
調査の方向性
Firebase C++ Auth Windows サンプルプロジェクトから始め、min-viable-blocking.js にデプロイされている beforeUserSignedIn 関数に対するメール/パスワードサインインを再現します。Windows のエラーを Android、iOS、web について説明されている動作と比較し、必要に応じて C++ quickstarts を確認します。Windows クライアントが blocking 関数の failed-precondition エラーとその追加データにアクセスできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
[REQUIRED] Please fill in the following fields:
- Pre-built SDK from the website or open-source from this repo: _____
- Firebase C++ SDK version: 13.0.0 (assuming flutterfire uses the latest version)
- Problematic Firebase Component: Auth (Auth, Database, etc.)
- Other Firebase Components in use: Firestore (Auth, Database, etc.)
- Platform you are using the C++ SDK on: Windows (Mac, Windows, or Linux)
- Platform you are targeting: Windows (iOS, Android, and/or desktop)
[REQUIRED] Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
When signing in with email and password, my project has a 'beforeUserSignIn' blocking function running before logging in that throws an HttpsError. On android/ios/web, throwing an HttpsError within the blocking function can be detected by the client attempting login, with it able to read the contents (i.e. that the HttpsError is 'failed-precondition').
On Windows, errors from the blocking function are clobbered into 'unknown-error' and any extra data in the HttpError is inaccessible.
Login when the blocking function immediately returns without error works as intended.
It may be because the firebase C++ SDK doesn’t provide any field or method for accessing additional error details. I would probably need a way to return the entire object back.
(Was redirected from https://github.com/firebase/flutterfire/issues/17592, so if I need to give you any more information please let me know (or if this issue isn't relevant to this project))
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase C++ quickstarts ?
What's the issue repro rate? (eg 100%, 1/5 etc)
I have not attempted this yet.
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
Using the example project on Windows, sign in with email and password whilst a blocking function has been configured and deployed.
You may need to configure the function in the Firebase Console at Authentication > Settings > Blocking Functions.
I was able to replicate the issue with this cloud function deployed.
If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.
Relevant Code:
min-viable-blocking.js
import { HttpsError, beforeUserSignedIn } from "firebase-functions/v2/identity";
import { setGlobalOptions } from 'firebase-functions/v2'
const functionConfig = {
region: "asia-south1",
concurrency: 60,
minInstances: 0,
maxInstances: 10,
cpu: 1.0,
};
setGlobalOptions(functionConfig);
export const beforeSignIn = beforeUserSignedIn( (event) => {
throw new HttpsError(
"failed-precondition",
"error message for the client to read",
{'usefulData': 'drink some water'} //<-- this is the data i want to access from the error object
);
});
- 主要言語
- C++
- スター
- 326
- フォーク
- 138
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-cpp-sdk のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
firebase/firebase-cpp-sdk#1905 · コメント 2 件 ·
-
api: firestore
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
firebase/firebase-cpp-sdk#1920 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
firebase/firebase-cpp-sdk#1904 · コメント 1 件 ·
-
new type: question
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
firebase/firebase-cpp-sdk#1892 · コメント 1 件 ·
-
nightly-testing
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
firebase/firebase-cpp-sdk#1859 ·
firebase/firebase-cpp-sdk の issue をすべて見る
似ている issue
-
bug build
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW オープンfuzz
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ClickHouse/ClickHouse#122114 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
module/agent platform/macos type/bug/regression
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
enhancement PyCDE
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100