Where do I find Firestore index error details? - firebase

I'm getting this error in the console when running my application in production:
{"code":"failed-precondition","name":"FirebaseError"}
I'm assuming this is a firestore index or rules error, but there are no details around which query is causing the problem. Firebase used to put a URL in the console to build missing indexes, but that feature seems to be gone.
Everything works as expected with no errors when running on an emulator.

Related

Azure Pipline Error: Failed to get Firebase project project-name. Please make sure the project exists and your account has permission to access it

Duplicate Question: By Uber, previously asked for google-cloud-firestore
My question is Related to Deploy Firebase from Azure DevOps. I have a list of tasks in my CI Pipeline which are running fine but the one firebase publish job consistently getting failed.
Error:
Also, I have put my token inside variables
install firebase tools:
firebase publish:
How can this be solved? what I'm doing wrong here?
I think the issue comes from the usage of your variables.
See all of the variables usage:
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#runtime-expression-syntax
You can find that no usage like this:
$key
I think it should be:
$(key)
In your situation, the issue should comes from $FIREBASE_TOKEN itself was been recognized as string "$FIREBASE_TOKEN", the actual value was not pass in.

com.google.firebase.FirebaseException : An internal error has occurred. [ API key not valid. Please pass a valid API key. ]

I am trying to login/register in my flutter app but it says the api key is invalid. It used worked fine earlier but after I ran flutter clean and flutter pub get subsequently , just couldnt login/register anymore.
Error screen
The solutions that I tried were:
Tried to resolve the issue by creating a new firebase app, but that didn't help either
Uninstall the app and run again
Check the build.gradle in app level as well as project
How do I fix it?

Error loading documents when viewing a firestore collection on firebase console

I am facing a very strange issue with cloud firestore. I have a collection named 'advertisements' and when I see the collection on firestore console it gives error Error loading documents. I tried to add a collection named 'ads' and its working fine and also all other collections are working fine. But I don't know why this strange thing is happening with collection 'advertisements'.
The issue is resolved and the main cause of the issue was a VPN extension installed in my chrome browser. So for anyone who is facing such an issue try to turn off any VPN or ad blocker extension and it will resolve the issue.

Linking to 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

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.

Resources