[@nativescript/firebase-firestore] ERROR collectionWithPath #bug
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- firebase, typescript
- 領域
- database, mobile-dev
研究方向
從 app.js 中的初始化和 Users.vue 中的 Firestore 呼叫開始,並將回報的 NativeScript-Vue 和 @nativescript/firebase 套件作為重現情境。比較將初始化放在 App.vue 中時的行為,然後在保留 app.js 中初始化的情況下,確認從 Users.vue 取得 users 集合是否正常運作。
由索引模型根據 Issue 內容生成。
描述
Bug Report: Cannot read properties of undefined (reading 'collectionWithPath') in Firebase Firestore
Description
When trying to fetch data from Firestore using firebase().firestore().collection("users"), the following error occurs:
However, initializing Firebase in App.vue instead of app.js resolves the issue.
Environment
- NativeScript-Vue:
3.0.0-rc.2 - @nativescript/firebase-firestore:
3.4.0-alpha.1 - Platform: (e.g., Android, iOS)
Steps to Reproduce
- Initialize Firebase in
app.jslike this:import { firebase } from "@nativescript/firebase-core"; import "@nativescript/firebase-firestore"; firebase().initializeApp({ showNotifications: true, showNotificationsWhenInForeground: true, }); - Fetch Firestore data in Users.vue
firebase()
.firestore()
.collection("users")
.orderBy("points", "desc")
.where("points", ">", 0)
.get()
.then((querySnapshot) => {
querySnapshot.forEach((documentSnapshot) => {
users.push({
...documentSnapshot.data(),
id: documentSnapshot.id,
});
});
});
- 主要語言
- TypeScript
- 星號
- 62
- 分支
- 53
- 平均合併
- 7 分鐘
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 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 ·
-
[messaging-core][ios] getCurrentToken stalls可能重新可做 @triniwiz 於 189 天前認領,目前沒有進行中的 PR。 未關閉bug ios
NativeScript/firebase#287 · 已指派 1 人 ·
-
Uh-Oh Shazam未關閉
難度 4/5 3-5 天 新手友好度 20/100
NativeScript/firebase#286 ·
查看 NativeScript/firebase 的全部 Issue
相似的 Issue
-
level/task reporter/qa type/bug
難度 2/5 1-3 小時 新手友好度 85/100
wazuh/wazuh-dashboard-plugins#9310 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
cybersemics/treecrdt#267 ·
-
難度 1/5 1-3 小時 新手友好度 85/100
wiz-sec-public/backstage-plugin-wiz#16 · 1 則留言 ·
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 72/100
solana-foundation/solana-com#2245 ·
維護者通常 1 天內回覆