google-cloud-firestore

Data Persistence on Angular with Firestore after page reload

时间秒杀一切 提交于 2020-06-01 05:06:39
问题 How could i persist or recall on my firestore server the data once i reload page for any reason? Basically in one of the components i make request to some data which by default gets initialized on my login Service component,lets say: USER Component export class UserComponent implements OnInit { resumeAccount: UserResumeAccount = { amountInAccount: 0, allDetails: null, }; constructor( private userLogged: LoginService) {} ngOnInit(): void { this.resumeAccount.allDetails = this.userLogged

googleapis.com/identitytoolkit/v3/relyingparty/verifyCustomToken returning CREDENTIAL_MISMATCH

萝らか妹 提交于 2020-06-01 04:47:44
问题 Final Goal: create a Firebase Custom Token with local NodeJs, post such Custom Token to googleapis/.../verifyCustomToken and get back an idToken that allow me to post a new document to Firestore as explained in other question Current achivement: I can successfuly create a Custon Token with this Cloud Function and follow successfully next steps (get an idToken from googleapis/.../verifyCustomToken and post successfully a docuemtn to Firestore). But I need the same from a local server (we are

Firestore querying multiple documents from collection

烈酒焚心 提交于 2020-05-31 05:43:54
问题 In Firestore I have a users collection and within each user document is stored a collection named favorites which contains the IDs of documents marked as favorites(stores) For example: in users/2pfV9FbtwPYFmQHz3KU2BKmhMr82/favorites I have multiple documents such as 7F9COWGW3Ww8FWiH8VTA and 8b8WogHzpqCkw0ZxMjOw I would like to make a query that returns all of the documents with the same docID from a collection called stores which contains these 2 IDs and many more(that are no in favorites

“Error loading documents” in Firebase Database

徘徊边缘 提交于 2020-05-31 04:58:06
问题 I'm experiencing error when trying to access Database menu item within Firebase console . It's a new Database with literally couple records of data but screen keep spinning for ages and then returns message " Error loading documents ". In the same time I'm able to access Authentication menu item without any problem. Note : I'm using MacBook Pro with Catalina 10.15.4 and Safari browser 13.1 回答1: It looks like it's a Firewall which is blocking my access to Database section within Firebase

Either zero or 2 or more [DropdownMenuItem]s were detected with the same value

夙愿已清 提交于 2020-05-30 08:12:12
问题 I am new to Flutter but I am trying to create a DropdownButtonFormField and it is not working. I am getting an error that says I have duplicate values. What is interesting is that I do not have a list with duplicate values. I have found a similar question on SO and the solution says to initiate the strings with a value and that the user was duplicating a list item, but I have a similar solution for another another list and it seems to work fine. I cannot figure out why it is not working here.

How does a Firestore onSnapshot listens for changes in React-Native?

|▌冷眼眸甩不掉的悲伤 提交于 2020-05-30 07:56:10
问题 I have seen in multiple places people placing the listener code inside the componentDidMount , however, I am wondering how does it work since componentDidMount is called only once, therefor, it should fetch only once. How does it fetches again when changes happen in Firestore? Example code : componentDidMount() { if(this.state.screen === 7){ var query = firestore().collection('Collection').doc().collection('subcollection'); query = query.where('act', '==', 1); query = query.where('city', '=='

How does a Firestore onSnapshot listens for changes in React-Native?

假装没事ソ 提交于 2020-05-30 07:55:47
问题 I have seen in multiple places people placing the listener code inside the componentDidMount , however, I am wondering how does it work since componentDidMount is called only once, therefor, it should fetch only once. How does it fetches again when changes happen in Firestore? Example code : componentDidMount() { if(this.state.screen === 7){ var query = firestore().collection('Collection').doc().collection('subcollection'); query = query.where('act', '==', 1); query = query.where('city', '=='

Error when trying to call setData(from: ) in the Cloud Firestore ios API. How can i fix it?

别等时光非礼了梦想. 提交于 2020-05-29 10:17:12
问题 Working in Swift.. I'm trying to call .setData(from: ) to write a Codable struct to a document in the cloud firestore database as outlined in the Firebase docs here to: https://firebase.google.com/docs/firestore/manage-data/add-data#custom_objects However, I'm getting the error: "Argument labels '(from:)' do not match any available overloads" The odd thing is I was able to build and run on the simulator once, and successfully posted a document, but now obviously the compiler is calling this

Error when trying to call setData(from: ) in the Cloud Firestore ios API. How can i fix it?

好久不见. 提交于 2020-05-29 10:17:11
问题 Working in Swift.. I'm trying to call .setData(from: ) to write a Codable struct to a document in the cloud firestore database as outlined in the Firebase docs here to: https://firebase.google.com/docs/firestore/manage-data/add-data#custom_objects However, I'm getting the error: "Argument labels '(from:)' do not match any available overloads" The odd thing is I was able to build and run on the simulator once, and successfully posted a document, but now obviously the compiler is calling this

Firestore local http with real db: The Cloud Firestore emulator is not running so database operations will fail with a 'default credentials' error

99封情书 提交于 2020-05-29 09:51:10
问题 I want to run a firebase http cloud function locally accessing a real remote firestore database. To do it, I'm running my functions locally using: FIREBASE_CONFIG="/path-to-credential.json" GOOGLE_APPLICATION_CREDENTIALS="/path-to-credential.json" firebase emulators:start --only functions As written here https://firebase.google.com/docs/admin/setup, this should permit the initialization of the admin sdk without any parameter. My functions index.js is as following import * as admin from