Skip to content

Emulator firestore UI Defaults to the literal name default Project Even with .firebaserc has 'default' parameter set to something elseΒ #1083

@ventisep

Description

@ventisep

❗ Emulator UI Defaults to default Project Even with .firebaserc Set

πŸ—­ Context

I'm using the Firebase Local Emulator Suite with a .firebaserc configured like:

{
  "projects": {
    "default": "my-project-local",
    "my-firebase-project": "my-project-cfbe5"
  }
}

From the root directory (same place as .firebaserc), I run:

firebase emulators:start

πŸ’¨ Unexpected Behavior

  • The Emulator UI defaults to showing /firestore/default/data, not /firestore/my-project-local/data.
  • Data written via scripts using @google-cloud/firestore (or firebase-admin) targeting my-project-local did not show up, and:
    • No errors were thrown
    • Try/catch blocks did not catch anything
    • Emulator logs showed no write activity
    • Data was not persisted in any database (live or emulator)

This leads to extremely confusing debugging. The developer assumes the projectId is correct and the emulator is running β€” but the Emulator UI and underlying Firestore instances are misaligned.

βœ… Workaround

The only way to get the emulator and UI to align correctly is:

firebase emulators:start --project my-project-local

Which causes the UI to properly route to:

/firestore/my-project-local/data

❗ Request

Please consider:

  • Making Emulator UI respect .firebaserc’s "default" project
  • Adding visible warnings or logs when the emulator receives writes with mismatched project IDs
  • Logging when data is silently discarded due to unrecognized projectId

πŸ” Why This Matters

Without visible errors or logs, this creates hours of confusion and the risk of:

  • Developers unknowingly thinking data was persisted
  • Assuming bugs in their write logic
  • Worse: accidentally writing to the live database

Thanks for your incredible work on Firebase β€” and hope this helps make emulator behavior safer and clearer!

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