google-cloud-firestore

Couldn't reach cloud firestore backend Android (21.3.0)

喜你入骨 提交于 2021-01-07 07:40:06
问题 I am a bit new to using firestore, and I recently got in to a problem. I am trying to get a collection back from the server, yet I keep getting an error: W/Firestore: (21.3.0) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds. This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend. My code:

Couldn't reach cloud firestore backend Android (21.3.0)

限于喜欢 提交于 2021-01-07 07:38:06
问题 I am a bit new to using firestore, and I recently got in to a problem. I am trying to get a collection back from the server, yet I keep getting an error: W/Firestore: (21.3.0) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds. This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend. My code:

Couldn't reach cloud firestore backend Android (21.3.0)

喜欢而已 提交于 2021-01-07 07:37:57
问题 I am a bit new to using firestore, and I recently got in to a problem. I am trying to get a collection back from the server, yet I keep getting an error: W/Firestore: (21.3.0) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds. This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend. My code:

How to iterate through a Firestore snapshot documents while awaiting

半腔热情 提交于 2021-01-07 04:07:38
问题 I have been trying to obtain a series of documents from firestore, reading them and acting accordingly depending on a series of fields. The key part is I want to wait for a certain process while working on each document. The official documentation presents this solution: const docs = await firestore.collection(...).where(...).where(...).get() docs.forEach(await (doc) => { //something }) The problem with this solution is taht when you have a promise inside the forEach it won't await it before

How to iterate through a Firestore snapshot documents while awaiting

北城以北 提交于 2021-01-07 04:01:13
问题 I have been trying to obtain a series of documents from firestore, reading them and acting accordingly depending on a series of fields. The key part is I want to wait for a certain process while working on each document. The official documentation presents this solution: const docs = await firestore.collection(...).where(...).where(...).get() docs.forEach(await (doc) => { //something }) The problem with this solution is taht when you have a promise inside the forEach it won't await it before

How to set up firebase as server and execute stripe payment

三世轮回 提交于 2021-01-07 03:57:28
问题 I would like to use firebase as a server and send request to payment request to stripe. I have zero experience server side so I am looking for a simple way to achieve this. This post Is it possible to integrate Stripe With Firebase and with iOS? is close to what I want to achieve and it also list some interesting link. Does anyone know where I can find a good but simple tutorial to set up firebase as a server for stripe? 回答1: I resolved this with the following 2 steps follow step 1, 2 and 3

How to set up firebase as server and execute stripe payment

橙三吉。 提交于 2021-01-07 03:56:00
问题 I would like to use firebase as a server and send request to payment request to stripe. I have zero experience server side so I am looking for a simple way to achieve this. This post Is it possible to integrate Stripe With Firebase and with iOS? is close to what I want to achieve and it also list some interesting link. Does anyone know where I can find a good but simple tutorial to set up firebase as a server for stripe? 回答1: I resolved this with the following 2 steps follow step 1, 2 and 3

Get map of map field from Firestore

断了今生、忘了曾经 提交于 2021-01-07 03:16:23
问题 I have a field of type map that contains Maps of data in firestore. I am trying to retrieve this data using a cloud function in node.js. I can get the document and the data from the field but i can't get it in a usable way. I have tried every solution i can find on SO and google but the below is the only code that can give me access to the data. I obviously need to be able to access each field with in the Map individually. in swift i build an array of String:Any but i can get that to work in

Get map of map field from Firestore

孤街浪徒 提交于 2021-01-07 03:15:16
问题 I have a field of type map that contains Maps of data in firestore. I am trying to retrieve this data using a cloud function in node.js. I can get the document and the data from the field but i can't get it in a usable way. I have tried every solution i can find on SO and google but the below is the only code that can give me access to the data. I obviously need to be able to access each field with in the Map individually. in swift i build an array of String:Any but i can get that to work in

Firestore rule succeeds in Playground and client but returns Permissions Denied using get method

走远了吗. 提交于 2021-01-07 02:56:54
问题 I have only one match statement and it is set to pass if the collection or document path is in the the user's permissions.read array. I'm only testing user u1 which has a permissions.read property. match /{document=**} { allow read: if document in get(/databases/$(database)/documents/users/$(request.auth.uid)).data.permissions.read; } I get the following responses when requesting the collection /companies/c1/departments/d1/employee or the document /companies/c1/departments/d1/employees/e1