googleapis / googleapis/google-cloud-java

[java-firestore] use Emulator with Firestore without credentials

Abierto
#13,141 6 comentarios 1 reacción 1 asignado Reclamado por @athakor Ver en GitHub
api: firestore type: question
Lenguaje dominante
Java
Estrellas
2.1k
Forks
1.2k
Merge medio
1 d 23 h
PR fusionados (30 d)
154

Descripción

Hi

based on the existing issues on the repo and the latest 2.0.0 release i understand that its suppose to be possible to connect to the FireStore emulator without providing a real credentials, as its not really needed.

i've tried to do the following

Firestore FS = FirestoreOptions.getDefaultInstance().toBuilder()
.setProjectId("test")
.setHost("localhost:8888")
.setCredentials(EmulatorCredentials())
.setCredentialsProvider(FixedCredentialsProvider.create(EmulatorCredentials()))
.build()
.getService();

using the latest 2.0.0 java-cloud-firestore.
but, it doesnt seems working and i still get the exception that asks me to provide GOOGLE_APPLICATION_CREDENTIALS.

what am i missing?

i also saw there was another merge on that area, and the additional .setEmulatorHost to the FireStoreOptions but it was not yet published.

thanks,
Chen

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.