Reputation: 653
I am trying to create firestore database but got the message "This project is set up to use Cloud Firestore in Datastore mode. This mode can only be accessed from Google Cloud Platform".
This is setup using GCP. How can I do that? Also not able to switch to native mode. Please help me.
Upvotes: 54
Views: 42165
Reputation: 1
This problem occurs when you are writing into Cloud Firestore without creating a database in Cloud Firestore, to solve this problem
First click the link you will navigate to the page named Google Cloud
Now delete the database that is already created there, you can do it very easily after the above step by going to the Firebase console's Cloud Firestore first creating the database, and then only trying to write on the created database will solve your problem.
Upvotes: 0
Reputation: 11
I was able to resolve it by simply go to google cloud CLI & then go to terminal & make sure you are in your project directory. Then fire the following command in terminal
gcloud alpha firestore databases update --type=firestore-native
Now go to firebase & refresh it , you will the FireStore Database is now enable
Upvotes: 1
Reputation: 71
I had the same issue for days, and I was able to resolve it by installing the google-cloud-cli.
$ snap install google-cloud-cli
$ gcloud auth login
$ gcloud config set project "PROJECT_ID"
$ gcloud alpha firestore databases update --type=firestore-native
And the problem will be solved.
Upvotes: 6
Reputation: 1
I have better solution that solution is , create new firebase project initially when you create project ,don't do anything but create first firestore database and ''' $ flutterfire configure ''' select new created project 100% it would work. after that rest of the work you can do like authentication and storage rest of the things.
Upvotes: 0
Reputation: 236
you can switch mode anytime, the current db should be empty.
can do using cloud console easily
gcloud alpha firestore databases update --type=firestore-native
Upvotes: 13
Reputation: 1508
Upvotes: 26
Reputation: 11
I face the same problem on creating a fresh project. I think it's default behavior with latest changes. Just go to Datastore and switch to NATIVE MODE.
Upvotes: 0
Reputation: 4670
This message indicates that your database was created in Datastore mode, when you created your project. You should be able to change it by accessing the Datastore Console using this link here and clicking in the available button to switch the mode - check here. However, as clarified in this other post from the Community here, you can only do it once and if you have not performed any changes in your database.
In case you don't fit in these above scenarios, you will need to create a new project and configure Firestore from the beginning.
Let me know if the information helped you!
Upvotes: 97