firebase / firebase/firebase-tools

demo projects can not be initialized without configuration data from real projects

Open
#5,218 5 comments 0 reactions 2 assignees Claimed by @christhompsongoogle View on GitHub
type: bug
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

### [REQUIRED] Environment info

**firebase-tools:** 11.14.3
**Platform:** Windows 11

### [REQUIRED] Test case

You can clone this repo and start the firebase emulators in it: https://github.com/joaomelo/hot-vue/tree/ec4e3bc8c4da0bffc9b42c6e5e5eecc393676326

### [REQUIRED] Steps to reproduce

Clone the repo (I think it will have the same behavior for any project thought), install firebase tools globally, open the windows terminal, and start emulators with `firebase --project demo-test emulators:exec "npm run test"`

### [REQUIRED] Expected behavior

The firebase [docs](https://firebase.google.com/docs/emulator-suite/connect_auth) says that "Local Emulator Suite supports emulation of real Firebase projects and demo projects." and that "A demo Firebase project has no real Firebase configuration and no live resources. These projects are usually accessed via codelabs or other tutorials. Project IDs for demo projects have the demo- prefix."

There was not a connection example I was able to find in the docs. Since it mentions only the project name starting with "demo-" as a requirement, the expected behavior I assumed was to pass just the projectID in the code below.

```js
const app = initializeApp({
projectId: "demo-test",
});
const auth = getAuth(app);
const db = getFirestore(app);
```

### [REQUIRED] Actual behavior

The instructions fail and complain about an invalid API key (image below). But how can I have a valid API key if it is a fake demo project?

![demo-project](https://user-images.githubusercontent.com/5727050/200126556-1b81f935-3a06-4dd9-80b0-4e239020133d.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.