AngularFire - How to set logging level? - google-cloud-firestore

I'm using AngularFire, but I don't see any way to set the logging level for debugging purposes. The Firestore documentation shows you can, but AngularFire doesn't seem to give you access to this object.
How can I set the logging level using AngularFire? If there is no way to do it, how would you suggest I do it using the general firestore SDK in Angular?

It seems that there isn't a specific way to import it, however, after some research, I could find this Github issue, that provides you an option of importing, that might help you.
You can give it a try using this following code:
import * as firebase from 'firebase/app';
import 'firebase/firestore';
firebase.firestore.setLogLevel('debug');
This way, you can try to set logging level.
Besides that, these other two below posts from the Community, you can find more information and options on logging error for debugging with Angular. I believe they might help you as a starting point.
is it possible in angular to set the debug log level at runtime?
How to log errors with Firebase Hosting for a deployed Angular web app
These other two articles provide more information on the use of Firestore with Angular.
How the AngularFire Library makes Firebase feel like Magic
Using Cloud Firestore in Angular With AngularFire
Let me know if the information helped you!

As of 2021, the import syntax got updated since user13068860's answer. I got the following to work in AngularFire 6.1.5.
import firebase from 'firebase/app';
firebase.firestore.setLogLevel('debug');

Related

Google Services Framework Identifier (gsfid) How to get it with Flutter

I am a beginner in flutter and would like your help.
I want to get the Google Services Frameword Identifier (gsfid) in a flutter app, but i can't find any plugin for that. I found a fairly old post on how to do it using java, but I couldn't get it to work, as flutter, if I understood correctly, uses kotlin and unfortunately I'm neither a java nor kotlin expert.
I read all the stuff about deviceID and Android_id, which is confusing enough on its own without starting to mention other "unique" ids (e.g. ad id etc).
I have concluded that what suits me for use in the particular application I have designed is the gsf id.
So if anyone knows the subject and is kind enough to help me, I will be grateful and thank you in advance.
Pataridis
I tried to convert the java code I found se kotlin and connect it (methodChannel) to my flutter application, but without any luck

Firebase 9 & Flutter: How to initializeApp?

I am desperately trying to figure out how to initializeApp with Flutter (not React Native).
I know about the functions to use, but I can not find the firebaseConfig I need to pass into the function.
And no matter what I search for, every resources references to React Native, like as if nobody codes with Flutter since Firebase 9 has been released anymore (or I am the only dummy which is not able to resolve this by myself).
Can someone tell me where to get the firebaseConfig object from?
If I add a new app to my project, I only get the google-services.json, which does NOT include the firebaseConfig object I need to pass.
I understand your confusion now, let me explain. When the guy in the video talks about Firebase v9 he is talking about the SDK version which in the case of Javascript (which I suppose is his main topic in his channel) is currently 9.17.1 an the version 9 has been around since 2021 so it is not new. The different SDKs have their own versions for each platform so thinking it will be the same in every SDK is a mistake by itself. You can check the SDKS here. So there is no Firebase v9, there is a Firebase SDK for javascript version 9. They managed in that way in javascript and in flutter it is not the same. Being that the last update in the flutter SDK was literally yesterday I'm pretty sure they have their reasons to not implement the same functions in flutter since 2021.
Now, one of the thinks the guy talks in the video is deconstructing, which is something common in javascript. The way you do this in flutter is by using show.
So you would be doing this for example:
import 'package:cloud_firestore/cloud_firestore.dart' show FirebaseFirestore, QuerySnapshot; //Add everything you would be using
This way only the specific parts of the library will be imported and the amount of code the Dart VM has to load will be reduced.
As of the access to documents, it is still the same but you can easily create a helper class that contents your references to your collections and then just use that class to reduce the boilerplate code created by the firebase SDK.
You have to install the Firebase CLI and run firebase init.
You need to use the package firebase_core that will give you access to the class Firebase so you can use it to initialize your app Firebase.initializeApp() you can pass the default options for the current platform using Firebase.initilizeApp(options: DefaultFirebaseOptions.currentPlatform) usually your IDE will automatically import the corresponding package but in case it does not you would have to import 'firebase/firebase_options.dart';
An useful link to the documentation: Add Firebase to your Flutter App

Manatee.Trello: Simple CRUD App for Updating Cards

I need to develop a simple CRUD console app to update a list of Trello cards from a CSV file. I'll run the app in TaskScheduler every night. I've installed #gregsdennis Manatee.Trello packages (impressive code!) but cannot find a single (complete example) of anything like this anywhere. All I've managed to do is auth in with app key and tokedn.
Is there a resource out there that shows simple (full) examples of how to get started? #gregsdennis—the C# libraries are extensive and obviously well thought out—I just need a jump start to get me going. Thanks to all in advance!
Here's the documentation site: https://gregsdennis.github.io/Manatee.Trello/usage/getting-started.html

What do you lose by ejecting a React app that was created using create-react-app?

I'm interested in using Hot Module Replacement with a newly created React app.
Facebook Incubator's create-react-app uses Webpack 2 which can be configured to support HMR, however in order to do so, one needs to "eject" the create-react-app project.
As the documentation points out, this is a "one way" operation and cannot be reversed.
If I'm to do this, I want to know what I might be giving up. I've been unable to locate any documentation that explains the potential drawbacks of ejecting.
The current configuration allows your project to get updates from create-react-app core team. Once you eject you no longer get this.
It's kind of like pulling in bootstrap css via CDN as opposed to downloading the source code and injecting it directly into your project.
If you want more control over your webpack, there are ways to configure/customize it without ejecting:
https://www.npmjs.com/package/custom-react-scripts

ionicBootstrap not importing in app.component.ts ionic v2.1.18

Hi Everyone,
My name is Kris Chery. I am new to ionic and am using version 2.1.18. I have been following this tutorial which I think is very insightful about the powers of ionic.
https://www.joshmorony.com/an-in-depth-explanation-of-providers-in-ionic-2/
I am stuck at the ionicBootstrap implementation. For now its a simple service that needs to display a message but for some reason. I can't seem to import ionic Bootstrap it is saying that ionicBoostrap wasn't exported from node modules.
This is information is imperative for me to my dream app. Any help would be much appreciated.
UPDATE: I have done a number or research on the matter but none led to a good explanation on how to fix it or to implement it properly.
I'd recommend not using that tutorial and using the official Angular docs instead. That was written back in July. Back then Angular 2 was only in RC phase and Ionic 2 was still in beta. A lot has changed since then.
You don't want to use bootstrapping for this, your app already does it's bootstrapping in app.ts. Instead in app.module.ts you can import other module and declare providers.
Angular 2 Tutorial: https://angular.io/docs/ts/latest/tutorial/
Bootstrapping and modules: https://angular.io/docs/ts/latest/guide/ngmodule.html#!#bootstrap