google-cloud-firestore

Vuex - 'do not mutate vuex store state outside mutation handlers'

眉间皱痕 提交于 2020-05-29 08:07:29
问题 I'm trying to initialize my Vuex store from Firestore. The last line of code context.commit('SET_ACTIVITIES', acts) is what creates the error. I don't think I'm mutating the state directly since I'm using an action. What could I be missing? Here's my Vuex store: export default new Vuex.Store({ strict: true, state: { activities: [] }, mutations: { SET_ACTIVITIES: (state, activities) => { state.activities = activities }, }, actions: { fetchActivities: context => { let acts = [] let ref = db

How to send location data to Firestore Database when app is killed in FLUTTER

丶灬走出姿态 提交于 2020-05-28 08:03:05
问题 I have been trying to create an app in flutter which sends the location data of a user to the Firestore Database EVEN WHEN THE APP IS KILLED. This plugin works well to get the location data when the app is killed: https://github.com/rekab-app/background_locator The problem is that I am unable to update the Firestore Database values in the 'callback' function of this plugin Here is my code: static void callback(LocationDto locationDto) async { print('location in dart: ${locationDto.toString()}

How to send location data to Firestore Database when app is killed in FLUTTER

倖福魔咒の 提交于 2020-05-28 08:02:25
问题 I have been trying to create an app in flutter which sends the location data of a user to the Firestore Database EVEN WHEN THE APP IS KILLED. This plugin works well to get the location data when the app is killed: https://github.com/rekab-app/background_locator The problem is that I am unable to update the Firestore Database values in the 'callback' function of this plugin Here is my code: static void callback(LocationDto locationDto) async { print('location in dart: ${locationDto.toString()}

Firebase function - query firestore

自作多情 提交于 2020-05-28 05:50:26
问题 Im trying to retrieve some data from firestore within a cloud function, but get nothing back. The same query on the client-side gives me the correct results. It's probably something small but I don't see the issue. What am I doing wrong? const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(); const db = admin.firestore(); db.settings({ timestampsInSnapshots: true }); exports.myFunction = functions.https.onCall((data, context) => { const

Firebase function - query firestore

匆匆过客 提交于 2020-05-28 05:49:26
问题 Im trying to retrieve some data from firestore within a cloud function, but get nothing back. The same query on the client-side gives me the correct results. It's probably something small but I don't see the issue. What am I doing wrong? const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(); const db = admin.firestore(); db.settings({ timestampsInSnapshots: true }); exports.myFunction = functions.https.onCall((data, context) => { const

Firebase firestore query: “Error: 9 FAILED_PRECONDITION: The query requires an index. You can create it here”

。_饼干妹妹 提交于 2020-05-27 13:16:49
问题 I have what I thought was a simple query on a collection called 'email': const emailQuery = admin .firestore() .collection('email') .where('sendAt', '>=', new Date()) .where('orderId', '==', doc.orderId) .where('brandId', '==', doc.brandId); I'm receiving the error in the subject of this post, indicating that I need to create an index for this query. I've tried creating a couple for the relevant fields, but I'm unsure of why it's needed since only one field is ordered--and the error remains

Firebase firestore query: “Error: 9 FAILED_PRECONDITION: The query requires an index. You can create it here”

允我心安 提交于 2020-05-27 13:16:31
问题 I have what I thought was a simple query on a collection called 'email': const emailQuery = admin .firestore() .collection('email') .where('sendAt', '>=', new Date()) .where('orderId', '==', doc.orderId) .where('brandId', '==', doc.brandId); I'm receiving the error in the subject of this post, indicating that I need to create an index for this query. I've tried creating a couple for the relevant fields, but I'm unsure of why it's needed since only one field is ordered--and the error remains

Firebase Cloud Function Authentication Trigger timing

痞子三分冷 提交于 2020-05-27 07:57:52
问题 Does anyone knows what the timing of the Firebase Cloud Functions onCreate Authentication Trigger is? Is it like: - User registers using SDK - Firebase creates user in and for Firebase Authentication - Firebase SDK sends login successful event - Function onCreate is invoked or like: - User registers using SDK - Firebase creates user in and for Firebase Authentication - Firebase onCreate is invoked - Firebase SDK sends login successful event Or in other words: Can I be sure that after a

Firebase cloud functions using Python?

我与影子孤独终老i 提交于 2020-05-26 10:47:09
问题 We are using GCP's Firebase with Firestore for a new mobile app we are developing. As part of this effort we need to deploy a number of cloud functions which will act as Firestore triggers for doing some back end processing. Our intention is to keep the deploys encapsulated inside of Firebase by using the firebase cli tools. However when we attempt to initiate the Firebase project for functions using the "firebase init functions" call the only two language options are "Javascript" and

Firebase cloud functions using Python?

ぃ、小莉子 提交于 2020-05-26 10:45:16
问题 We are using GCP's Firebase with Firestore for a new mobile app we are developing. As part of this effort we need to deploy a number of cloud functions which will act as Firestore triggers for doing some back end processing. Our intention is to keep the deploys encapsulated inside of Firebase by using the firebase cli tools. However when we attempt to initiate the Firebase project for functions using the "firebase init functions" call the only two language options are "Javascript" and