google-cloud-firestore

Can't get data from React-Native-Firebase(v6) Firestore: undefined is not a function (near '…this._firestore.native.collectionGet…')

落花浮王杯 提交于 2021-01-21 13:50:52
问题 I've been stuck on this issue for so long. I just started implementing Firestore in my react-native application with react-native-firebase. I'm just following the docs [https://invertase.io/oss/react-native-firebase/v6/firestore/quick-start#reading-data] but it doesn't work for me. This is in Android. Haven't tested in iOS yet. I keep getting this error: [TypeError: undefined is not a function (near '...this._firestore.native.collectionGet...')] Here's the relevant code: import React,

Can't get data from React-Native-Firebase(v6) Firestore: undefined is not a function (near '…this._firestore.native.collectionGet…')

这一生的挚爱 提交于 2021-01-21 13:48:04
问题 I've been stuck on this issue for so long. I just started implementing Firestore in my react-native application with react-native-firebase. I'm just following the docs [https://invertase.io/oss/react-native-firebase/v6/firestore/quick-start#reading-data] but it doesn't work for me. This is in Android. Haven't tested in iOS yet. I keep getting this error: [TypeError: undefined is not a function (near '...this._firestore.native.collectionGet...')] Here's the relevant code: import React,

Can't get data from React-Native-Firebase(v6) Firestore: undefined is not a function (near '…this._firestore.native.collectionGet…')

青春壹個敷衍的年華 提交于 2021-01-21 13:47:33
问题 I've been stuck on this issue for so long. I just started implementing Firestore in my react-native application with react-native-firebase. I'm just following the docs [https://invertase.io/oss/react-native-firebase/v6/firestore/quick-start#reading-data] but it doesn't work for me. This is in Android. Haven't tested in iOS yet. I keep getting this error: [TypeError: undefined is not a function (near '...this._firestore.native.collectionGet...')] Here's the relevant code: import React,

Firebase Firestore: custom admin access

蹲街弑〆低调 提交于 2021-01-21 03:48:09
问题 In Firebase Firestore, I'm trying to allow only (custom-assigned) admins to write/update/delete resources, and for that I've got these security rules: service cloud.firestore { match /databases/{database}/documents { match /resources { allow read; allow write, update, delete: if get(/users/$(request.auth.uid).isAdmin); } match /resources/{resource} { allow read; allow write, update, delete: if get(/users/$(request.auth.uid).isAdmin); } } } I'm signing in with the user that is marked as an

How can I join two Firestore queries using rxfire and rxjs (OR query)

放肆的年华 提交于 2021-01-20 18:39:25
问题 The goal is simple: to join two firestore queries utilizing rxjs , rxfire , and the rnfirebase react native library. I've read multiple tutorials 1, 2 on joining queries, but they all fail with different errors. //Simple test for collectionData import { collectionData } from 'rxfire/firestore'; this.myQuery = this.props.docRef.collection(`messages`).where('read', 'array-contains', this.props.me.uid) collectionData(this.myQuery, 'id').subscribe(docs => console.log(docs)) //Fails with error:

How can I join two Firestore queries using rxfire and rxjs (OR query)

白昼怎懂夜的黑 提交于 2021-01-20 18:39:02
问题 The goal is simple: to join two firestore queries utilizing rxjs , rxfire , and the rnfirebase react native library. I've read multiple tutorials 1, 2 on joining queries, but they all fail with different errors. //Simple test for collectionData import { collectionData } from 'rxfire/firestore'; this.myQuery = this.props.docRef.collection(`messages`).where('read', 'array-contains', this.props.me.uid) collectionData(this.myQuery, 'id').subscribe(docs => console.log(docs)) //Fails with error:

Delete button on RecyclerView deletes the wrong item

a 夏天 提交于 2021-01-20 13:36:20
问题 I am using Firestore adapter for my RecyclerView and I am having trouble with the 'Delete' button. When I press it, it deletes the wrong item instead of the one that I wanted. Here is the code for my button inside of the onBindViewHolder : protected void onBindViewHolder(@NonNull AdminRewardAdapter.RewardViewHolder holder, int position, @NonNull RewardModel model) { fStore = FirebaseFirestore.getInstance(); holder.rank.setText(String.valueOf(position + 1)); Double dq = model.getDonationReq();

Querying Firestore map fields in flutter

前提是你 提交于 2021-01-20 12:59:29
问题 I am trying to retrieve posts in my Firestore database from a field called "bookmarks" . The field "bookmarks" is of type map. When a user bookmarks a post, the field is updated with the deviceId being set to true like this: ▼ bookmarks deviceId : true When the post is unbookmarked, deviceId : true is deleted and the bookmarks field remains empty like this: bookmarks: {} I am trying to retrieve posts from "bookmarks" where deviceID is set to true . My query however returns all posts including

Querying Firestore map fields in flutter

核能气质少年 提交于 2021-01-20 12:59:21
问题 I am trying to retrieve posts in my Firestore database from a field called "bookmarks" . The field "bookmarks" is of type map. When a user bookmarks a post, the field is updated with the deviceId being set to true like this: ▼ bookmarks deviceId : true When the post is unbookmarked, deviceId : true is deleted and the bookmarks field remains empty like this: bookmarks: {} I am trying to retrieve posts from "bookmarks" where deviceID is set to true . My query however returns all posts including

Firebase rules when user log out 'Missing or insufficient permissions. Error: Missing or insufficient permissions'

孤街醉人 提交于 2021-01-20 12:53:45
问题 Error : 'Error with profile listener: Missing or insufficient permissions. Error: Missing or insufficient permissions.' My app is a project manager built using Reactjs, Redux, Firebase. Could you tell me why it gives this error when the user logs out and how to solve it? My rules: service cloud.firestore { match /databases/{database}/documents { // Match any {project} document in the 'projects' collection match /projects/{project} { // Allow signed in users to read write projects allow read,