[@nativescript/firebase-firestore] ERROR collectionWithPath #bug
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- firebase, typescript
- Lĩnh vực
- database, mobile-dev
Hướng nghiên cứu
Bắt đầu với việc khởi tạo trong app.js và lệnh gọi Firestore trong Users.vue, sử dụng các package NativeScript-Vue và @nativescript/firebase đã được báo cáo làm ngữ cảnh tái hiện. So sánh hành vi khi việc khởi tạo được đặt trong App.vue, sau đó xác minh rằng việc lấy collection users hoạt động từ Users.vue khi vẫn giữ việc khởi tạo trong app.js.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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,
});
});
});
- Ngôn ngữ chính
- TypeScript
- Star
- 62
- Fork
- 53
- Merge trung bình
- 8 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NativeScript/firebase
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
NativeScript/firebase#292 ·
-
Can't install package Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
NativeScript/firebase#289 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
NativeScript/firebase#288 · 4 reaction ·
-
bug ios
NativeScript/firebase#287 · 1 người được giao ·
-
Uh-Oh Shazam Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
NativeScript/firebase#286 ·
Tất cả issue của NativeScript/firebase
Issue tương tự
-
[Bug]: Discord Activity titles with emoji are rejected as over 80 characters when they are not Đang mởclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
supermomonga/zcode-acp#24 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
growthbook/growthbook#7100 ·
-
triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100