[Bug] Errors fail to return all data from error object.
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 6
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-cpp-sdk 的其他 Issue
-
new type: question
难度 2/5 1-3 小时 新手友好度 85/100
firebase/firebase-cpp-sdk#1926 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
firebase/firebase-cpp-sdk#1905 · 2 条评论 ·
维护者通常 1 天内回复
-
api: firestore
难度 5/5 一周以上 新手友好度 35/100
firebase/firebase-cpp-sdk#1920 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 70/100
firebase/firebase-cpp-sdk#1904 · 1 条评论 ·
维护者通常 1 天内回复
-
new type: question
难度 4/5 3-5 天 新手友好度 45/100
firebase/firebase-cpp-sdk#1892 · 1 条评论 ·
维护者通常 1 天内回复
查看 firebase/firebase-cpp-sdk 的全部 Issue
相似的 Issue
-
category:port-update
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
tensorflow/tflite-micro#3784 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
agentic-workflows automation
难度 2/5 1-3 小时 新手友好度 78/100
tenstorrent/tt-metal#57946 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
aristocratos/btop#1857 ·
维护者通常 3 天内回复