Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Question] Assert in auth.cc line 119 when trying to create Auth

未关闭
#1,680 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp

调研方向

从 auth/src/auth.cc 第 119 行开始,将报告的 Windows 桌面流程与 test-app 中正常工作的 auth 示例进行比较。在同一线程上使用 App::Create、Auth::GetAuth 和 SignInAnonymously 重现该序列。完成的标准是确定 assertion 的原因,并为 Windows 桌面情况记录或实现经过验证的解决方案。

由索引模型根据 Issue 内容生成。

描述

needs-triage new type: question
[REQUIRED] Please fill in the following fields:
  • Pre-built SDK from the website or open-source from this repo: Pre-build SDK
  • Firebase C++ SDK version: 12.1.0
  • Main Firebase Components in concern: Auth (Auth, Database, etc.)
  • Other Firebase Components in use: App,Firestore,Storage (Auth, Database, etc.)
  • Platform you are using the C++ SDK on: Windows (Mac, Windows, or Linux)
  • Platform you are targeting: iOS, Android (iOS, Android, and/or desktop)
[REQUIRED] Please describe the question here:

I was not able to reproduce the issue on test-app where auth example works properly on desktop.

Issue occurs only on Desktop when using c++ wrapper on Windows (Android and iOS works fine)

I'm following general FirebaseApp creation:

m_App = firebase::App::Create();

later on when i try to get Auth by calling this code: (from the same thread)

firebase::App* app = FirebaseApp::Get();
if (!app)
    return nullptr;

firebase::auth::Auth* auth = firebase::auth::Auth::GetAuth(app);
if (!auth)
    return nullptr;

return auth;

I'm getting hard crash with assert from auth.cc line 119

If I try to create auth immediately after creating app i will get a proper object but then calling eg.:

firebase::Future<firebase::auth::AuthResult> result = auth->SignInAnonymously();

Result in exact same assert.

Can you please assist what may be the cause? Is there some kind of releasing object under the hood?

Image
Image
Image

主要语言
C++
星标
326
派生
138
平均合并
2 天 16 小时
30 天内合并 PR
3

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

firebase/firebase-cpp-sdk 的其他 Issue

查看 firebase/firebase-cpp-sdk 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。