Skip to content

Can't connect to Firestore Emulator #233

@matthew-hackett

Description

@matthew-hackett

I have the firestore emulator running on Port 8080, but I cannot connect to it using any method I try with FireO. No errors are being thrown, but the emulator is not updating either.

import os

# I've tried variations on this
# I have also tried using environment variables at startup (using PyCharm IDE run configuration) rather than runtime
os.environ["FIRESTORE_EMULATOR_HOST"] = "localhost:8080"
os.environ["GOOGLE_CLOUD_PROJECT"] = "demo-project"
os.environ["FIRESTORE_PROJECT_ID"] = "demo-project"

import fireo
from google.cloud import firestore

# I have also tried this with just fireo.connection() but it gives me a terminal error looking core json credentials.
client = firestore.Client()
fireo.connection(client=client)

# Import models
# Create models
# Save models

I can't find any documentation on connecting to the emulator, but from some discussions it seems like people have done it before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions