[firebase 3.2.x] Android "default FirebaseApp is not initialized"
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 30/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- android, typescript
- 領域
- mobile-dev
研究方向
從 initFirebase 函式開始,比較 3.1.3 與 3.2.2 版本之間 Firebase Core Android 的初始化過程。使用列出的 NativeScript 與 Firebase 套件版本重現此問題,然後驗證 initializeApp() 不再回傳 null,且後續的 Crashlytics 呼叫在 Android 上成功。
由索引模型根據 Issue 內容生成。
描述
CLI: 8.6.5
@nativescript/core: 8.6.2
@nativescript/firebase-analytics: 3.2.2
@nativescript/firebase-core: 3.2.2
@nativescript/firebase-crashlytics: 3.2.2
@nativescript/firebase-messaging: 3.2.2
Were there any breaking changes in the latest versions of firebase-core analytics, crashlytics or messaging? After updating from version 3.1.3 to version 3.2.2 or 3.2.0, I get this error on Android devices:
Error: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.myapp.myapp. Make sure to call FirebaseApp.initializeApp(Context) first.
My code, unchanged from the previous version. initializeApp() returns null and the next line throws the exception.
import { firebase } from "@nativescript/firebase-core";
import "@nativescript/firebase-analytics";
import "@nativescript/firebase-crashlytics";
import "@nativescript/firebase-messaging";
export async function initFirebase() {
const app = await firebase().initializeApp();
// app is null
firebase().crashlytics().setCrashlyticsCollectionEnabled(true);
}
Downgrading to version 3.1.3 all works fine.
- 主要語言
- TypeScript
- 星號
- 62
- 分支
- 53
- 平均合併
- 8 天 4 小時
- 30 天內合併 PR
- 2
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NativeScript/firebase 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 48/100
NativeScript/firebase#292 ·
-
難度 3/5 1-2 天 新手友好度 35/100
NativeScript/firebase#289 ·
-
難度 4/5 3-5 天 新手友好度 35/100
NativeScript/firebase#288 · 4 個 reaction ·
-
bug ios
NativeScript/firebase#287 · 已指派 1 人 ·
-
Uh-Oh Shazam 未關閉
難度 4/5 3-5 天 新手友好度 20/100
NativeScript/firebase#286 ·
查看 NativeScript/firebase 的全部 Issue
相似的 Issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 1/5 1 小時以內 新手友好度 85/100
-
Mend: dependency security vulnerability untriaged
難度 2/5 1-3 小時 新手友好度 70/100