Closed batigoal82 closed 3 years ago
Does the project ID affect the local Firestore UI? What should it be set to instead? cc/ @dmitry-s PTAL.
@meltsufin maybe it can just use project from application properties if it is present and unused otherwise which probably might solve the issue and won't be confusing
here is another reason to control it, whenever we are using emulator we can curl -X DELETE /project/{projectId}
to cleanup database, so it will be better to control projectId name
Describe the bug With #2244 , autoconfiguration for firestore emulator has been introduced. The autoconfiguration configures a hard coded project id "unused". The consequences are that anything you do in your code like adding documents to your collection will work and can be retrieved from code but will not be revealed in the Firebase UI at http://localhost:4000/firestore.
Environment info spring-cloud-gcp version 1.2.5.RELEASE $ firebase --version 8.10.0
Steps to reproduce
Run firebase init on an empty folder and start the emulator with
firebase emulator:start
. This will ask you which project you want the emulator to emulate. Select the same project as you will configure in your spring boot application in the next step. Once you provide all the required settings, it will start a web application which you can then open in a browser. Navigate to the firestore emulator page.Create a Spring boot application and add spring-cloud-gcp-starter-data-firestore. Configure your application to use firestore emulator with
spring.cloud.gcp.project-id=<google-project-id>
spring.cloud.gcp.firestore.emulator.enabled=true
spring.cloud.gcp.firestore.host-port=host:port
Do a write operation in your code so you can see it in the firestore emulator UI.
Expected behavior Firebase UI at http://localhost:4000/firestore should show the data.
Actual behavior Firebase UI at http://localhost:4000/firestore shows only an empty root.