This project is set up to use Cloud Firestore in Datastore mode. This mode can only be accessed from Google Cloud Platform
Asked Answered
P

8

48

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.

Pythagoras answered 21/7, 2020 at 5:18 Comment(1)
Related: #64813346Bussard
I
87

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!

Indira answered 21/7, 2020 at 7:39 Comment(3)
Thanks @gso_gabriel. Yes you are right, we can switch to Firestore mode only if not performed any changes in the database, but unfortunately I did that earlier. So nee dto restructure by creating new project. Thanks alot for your response.Pythagoras
I have not changed any configuration. suddenly how does it converts to Datastore mode ??Bathroom
i was able to switch even after creating some entities in Datastore mode, simply delete all the data / entities, and then wait for some time. Open the firestore console again after some time and you should see (this)[i.sstatic.net/fDxNO.png] banner which allows you to switchReese
P
22
  1. Go over to Firestore Database
  2. Click on the link provided
  3. Change to Native Modeenter image description here
Playmate answered 20/2, 2023 at 16:50 Comment(1)
This should be the new accepted answer as of 2024.Reefer
H
13

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
Hygrometric answered 1/4, 2023 at 16:47 Comment(0)
L
6

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.

Lilli answered 4/9, 2023 at 6:18 Comment(1)
Thanks for sharing the sequence of steps. It is really useful and a better answer than all those 'one-liners' that fail because of the pre-requisite steps you mentioned.Freeforall
A
1

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

Acute answered 16/3 at 17:51 Comment(0)
A
0

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.

Aguste answered 18/1, 2023 at 12:44 Comment(3)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Publican
This answer should be upvoted more. Somehow on creating a new project, it brings an error "Failed to provision Cloud Firestore.." then on refreshing page it say it's in Datastore mode. This is either a bug or bad UXSmoothie
Error "Cannot enable Firestore for this project An unknown error occurred" for Google EngineersSmoothie
D
0

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.

Distich answered 28/8, 2023 at 7:49 Comment(0)
V
0

This problem occurs when you are writing into Cloud Firestore without creating a database in Cloud Firestore, to solve this problem

  1. First click the link you will navigate to the page named Google Cloud

  2. 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.

Varicocele answered 8/5 at 8:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.