Linking to FireBase - firebase

After following all the steps on google, after I run the emulator from scratch I get the following message:
On the google Firebase site it also tells me "Congratulations, you've successfully added Firebase to your app! ". But I am worried I did not do things properly and do not want to run in to problems later.
I do not have any problems uploading the code to the android emulator, hence I do not know if it successfully connected to Firebase. How can I properly check if I am actually indeed connected to Firebase?

If you want to check it through your code
Try getting the user by (just for the test)
await FirebaseAuth.instance.getCurrentUser()//should return null
If it throws no error everything is setup correctly
Make sure the emulator has Google play services installed

Related

How to trace exact issue from Firebase Crashlytics log in React Native App?

I have a React Native app with Firebase crashlytics integrated. I am forcefully crashing the app by calling function which does not exist. (this.test()).
I am getting logs in crashlytics, but looking at that logs I am not able to track the exact issue location.
Logs are quite generic and which is not helping me to pinpoint the issue.
Is there any way to get more info on that issue from logs? or anything I need to do so that I can get the issue location? if we are getting an issue in the inded.js file can we trace back the exact js file in app which is causing the issue.
Please help me with this information. Than you for helping.
Firebaser here - it sounds like you'd benefit from Crashlytics custom logging. This tool allows you to log any messages you want that get appended to the Crashlytics crash report that gets sent up to the console. I'm not sure how the React Native wrapper for Firebase Crashlytics works or if it allows you to do this, but according to the React Native Firebase reference doc you should be able to.
With this tool, you could call log in your code whenever you want to record information about the session, the user, or whatever's happening with code that you're executing in the background.

Google sign in with Flutter on Android Studio

I've been looking for an answer for way too long. I am trying to implement the google sign in method with flutter and firebase so that I can access my google agenda via the google API afterwards. I get the following error: E/FirebaseInstanceId( 6925): Google Play services missing or without correct permission.
Even with the code of this video : https://www.youtube.com/watch?v=NaFI6bVI_NY&t=239s I get the error.
So you can assume my code is the same as her.
Thank you.
Most probable reason you are facing this error is because your Emulator does not have Google Play services Installed,
So try checking avd manager and see if the emulator you are running has Play Store Services installed.
You can check that by the icon like shown below:
If there is no Play Store service installed on existing emulator then create a new device having Play Store Services.

Firebase deploy fails after adding second project

After adding a second project to my code using the command $ firebase use --add second-project, I get the error
There was an issue deploying your functions. Verify that your project has a Google App Engine instance setup at https://console.cloud.google.com/appengine and try again. If this issue persists, please contact support.
Error: HTTP Error: 404, Could not find Application "second-project".
when I run $ firebase deploy.
I have added separate targets and a web app through Firebase console for the second project.
What should I be checking to get rid of this error?
I just ran into this same exact issue as well. Leaving this here for anyone that runs into this issue in the future. What caused this error for me was a permissions error, when Firebase tried to access specific resources in Google Cloud such as Cloud Functions without the necessary IAM/service accounts in place.
This happens when you create a new Firebase project without setting the Default GCP resource location under Settings > General in the Firebase Console, which occurs when you create a new Firebase project without doing any additional setup. You can set this in the settings or this is also set when you follow the walk-through instructions for setting up services such as Firestore or Firebase Storage in the Firebase console.
Without this set, the <YOUR_FIREBASE_PROJECT_NAME>#appspot.gserviceaccount.com IAM/service account will not be created in Google Cloud (which is needed to create/access specific resources), therefore when you run firebase deploy, it will fail with the error you mentioned above.
You can also check why your firebase deploy is failing in the firebase-debug.log that is generated when running this command (that's how I found out the cause of this error). Though I think this file is deleted after the command finishes execution, so you'll have to pipe the output into a file or save it some other way.
TL;DR: Set Default GCP resource location, one way this can be done is in the Firebase Console under Settings > General.

Cloud Functions deployment failiure from Firebase

I seem to be unable to deploy Google Cloud Functions successfully.
I have created a project on Google Cloud Platform and then proceeded to link it to Firebase via the Firebase console. I select ADD PROJECT and Add Firebase to an existing project. Everything seems to link.
When I try to deploy a cloud function (the simple helloWorld that comes with installing firebase-tools) I keep getting deployment errors. This also happens when trying to deploy functions from Google Cloud Functions dashboard as well.
The error is something aboud setting up the environment.
After ttrying to rename the function to something else, I seem to have luck with deploying but then the function but there is a communication error Function load error: Error: cannot communicate with function.
I am unable to deploy functions on two of my projects, and firebase has been acting very strangely in the last few days, so can somebody please tell me if I am doing something wrong or is it a Firebase glitch
Maybe because there is an outage starting from early this morning. Check status here: https://status.firebase.google.com

Real-Time Slack clone with AngularFire not working even after changes done

I tried to work this tutorial https://thinkster.io/angularfire-slack-tutorial#authenticating-users-using-angularfire
And the problem i have is with Firebase Authentication. In code there are no errors but it doesn't want to connect with base and error is:
Projects created at console.firebase.google.com must use the new Firebase Authentication SDKs available from firebase.google.com/docs/auth/
I even updated the code to match with the new firebase 3.x.x syntax still i can seem to make it work.

Resources