You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initialize firestore in firebase CLI for a new project by runnning firebase init firestore.
Steps to reproduce
Create a new Firebase project in the web console.
Create a fresh Firestore database.
Install/update firebase tools CLI on your Mac.
Log in to Firebase via the firebase tools CLI.
Run firebase init firestore --debug and when prompted, select the Firebase project you created in step 1.
Expected behavior
Successful API request of: [2023-01-22T19:52:19.975Z] <<< [apiv2][body] GET https://appengine.googleapis.com/v1/apps/[app-name]
Below, you can see the cause of the issue is that the default GCP resource location is not set. It would seem that the expected behavior would be for the console to force/prompt the user to choose a default GCP resource location with initial setup.
Actual behavior
[2023-01-22T19:48:57.505Z] <<< [apiv2][body] GET https://appengine.googleapis.com/v1/apps/[app-name] {"error":{"code":404,"message":"App does not exist.","status":"NOT_FOUND"}}
[2023-01-22T19:48:57.505Z] error getting database typeHTTP Error: 404, App does not exist. {"name":"FirebaseError","children":[],"context":{"body":{"error":{"code":404,"message":"App does not exist.","status":"NOT_FOUND"}},"response":{"statusCode":404}},"exit":1,"message":"HTTP Error: 404, App does not exist.","status":404}
[2023-01-22T19:48:57.506Z] database_type: undefined
Error: It looks like you haven't used Cloud Firestore in this project before. Go to https://console.firebase.google.com/project/[app-name]/firestore to create your Cloud Firestore database.
Temporary Solution
A solution has already been found in an off-topic (closed) issue here: #4254
However, I'm filing the bug report because users will continue to have this issue and experience confusion as the CLI gives a non-descriptive error, and it would seem that the expected behavior would be for the console to force/prompt the user to choose a default GCP resource location with initial setup.
Permanent Solution
Options include:
Console prompting user to set the default GCP location when setting up the Firestore instance initially
CLI giving more descriptive error, that GCP default resource location needs to be set in the console
CLI automatically setting the default GCP resource location
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. init firestore was checking for a default resource location, because firestore used to require one. Now that it doesn't (and now that setting up a Firestore DB doesn't set DRL), this check was frequently failing for new projects.
Environment info
firebase-tools: 11.21.0
Platform: macOS
Test case
Initialize firestore in firebase CLI for a new project by runnning
firebase init firestore
.Steps to reproduce
firebase init firestore --debug
and when prompted, select the Firebase project you created in step 1.Expected behavior
Successful API request of:
[2023-01-22T19:52:19.975Z] <<< [apiv2][body] GET https://appengine.googleapis.com/v1/apps/[app-name]
Below, you can see the cause of the issue is that the default GCP resource location is not set. It would seem that the expected behavior would be for the console to force/prompt the user to choose a default GCP resource location with initial setup.
Actual behavior
Temporary Solution
A solution has already been found in an off-topic (closed) issue here: #4254
The solution (#4254 (comment)):
However, I'm filing the bug report because users will continue to have this issue and experience confusion as the CLI gives a non-descriptive error, and it would seem that the expected behavior would be for the console to force/prompt the user to choose a default GCP resource location with initial setup.
Permanent Solution
Options include:
The text was updated successfully, but these errors were encountered: