Skip to content

Can not import data to the emulator #859

@pascalbe-dev

Description

@pascalbe-dev

When running an import for the local emulator, the data is not really imported to the firestore emulator.

Steps to reproduce the behavior

  • start the firebase emulator with a demo project ID (firebase emulators:start --project demo-my-project --config some-folder/firebase.json) (a firebase.json which includes the activated firestore emulator on port 8080 is present in "some-folder")
  • setting the FIRESTORE_EMULATOR_HOST environment variable to localhost:8080
  • running a import command, e.g.: firestore-import -y -b users.json -n users

Expected behavior

  • the data gets imported into the database (this is how it works with actual firebase projects)

Actual behavior

  • I get an error message about a missing GOOGLE_APPLICATION_CREDENTIALS variable

  • when I now point this env variable to the service account key for a different environment, the import command works (success message), but data is still not imported in the emulator.

Final thoughts

So, basically, I see two problems:

  • why is the service account key required for the emulator?
  • why is the data not imported even with a service account key?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions