ERROR FirebaseError: Expected type '_Query', but it was: a custom _CollectionReference object in 21.0.0-rc.0
- Ngôn ngữ chính
- TypeScript
- Star
- 7.8k
- Fork
- 2.2k
- Merge trung bình
- 22 giờ 28 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
# Issue
Upgraded to the release candidate and using the following collection subscription:
``` typescript
collectionData(collection(firestore, `users/${u.uid}/devices`), {
idField: 'id',
})
```
# Error
ERROR FirebaseError: Expected type '_Query', but it was: a custom _CollectionReference object
# Analysis
Not sure how to provide more detail on this, but it seems to be during a cast to Query in the `onSnapshot` handler.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện ví dụ collectionData trên 21.0.0-rc.0, sau đó kiểm tra handler onSnapshot và phép cast của nó sang Query. Hoàn tất khi subscription của collection không còn phát sinh FirebaseError đối với một CollectionReference; hãy thêm hoặc cập nhật coverage cho trường hợp này nếu repository có vị trí test phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- firebase, typescript
- Lĩnh vực
- databases
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 65/100