firebase-tools: Error fetching Firestore indexes
[REQUIRED] Environment info
firebase-tools: 7.13.1
Platform: Windows 10
[REQUIRED] Test case
firebase init
[REQUIRED] Steps to reproduce
Well, firebase init?
[REQUIRED] Expected behavior
I just want to init the Firebase project…
[REQUIRED] Actual behavior
There was error while firebase init.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 20
- Comments: 32 (9 by maintainers)
Just go to gcloud console and switch back to Native mode in datastore / firestore. then run this command again all works.
@PsychoXIVI thanks for the logs! The error is here:
This is a bug, we should catch this configuration earlier. The Firebase CLI is only useful for Firestore in Native mode, not Datastore mode. For now you can get around this by using
firebase initbut not selecting Firestore as one of your projects.FYI I did switch to Firestore mode before seeing this problems.
My work around is
foodata.firebase initagain.and it work now.
When you run
firebase initit will ask which features you want to initialize:To work around this issue, you should not select “Firestore” from the list.
just create one collection in firestore and run firebase init , it will work.
Hey everyone we have been digging into this over the past day or two and there’s clearly an issue within the Firebase console. It seems that some old projects in which Firestore was never used are being marked as having Firestore in Datastore Mode (rather than having nothing).
It’s not something you need to worry about (you can just switch it over) but it is something we want to fix quickly because it’s a bad experience. I will post an update here when I have one.
Also having the same problem in May 2020. Removed firestore from init and it worked, but obviously that’s not a solution for many people.
Better solution to this problem is to create an empty
firestore.indexes.jsonfile and then runfirebase init.Worked for me.
I got this problem and I did not ever put datastore into “datastore” mode.
amigos la solucion esta aqui solo hagan esto en su consola de firebase y ya muchas gracias