Firebase Local Emulator Suite: use a project ID starting with 'demo-' or Functions calls to non-emulated services 'will affect production' (and 'Unable to look up project number')
Run the emulators with a demo- project ID (firebase emulators:start --project demo-myapp, or "default": "demo-myapp" in .firebaserc) whenever you don't need a real project. With a demo- ID the CLI makes no production calls, needs no firebase login, and Admin SDK calls inside functions can't reach live services.
With any other ID and no login, firebase-tools 15.36.0 starts anyway, but prints:
- You are not currently authenticated so some features may not work correctly. Please run firebase login
- Unable to look up project number for my-probe. ... If this is a fake project, please use a project ID starting with 'demo-' to skip production calls.
- functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: apphosting, auth, database, hosting, pubsub, storage, dataconnect
- functions: Unable to fetch project Admin SDK configuration, Admin SDK behavior in Cloud Functions emulator may be incorrect.
The third line is the dangerous one: with a real project ID and logged-in credentials, an admin.auth() or Storage call from an emulated function goes to the real backend. Either start every emulator your functions touch (--only functions,firestore,auth,storage) or use a demo- ID. The client SDKs must use the same ID (initializeApp({ projectId: "demo-myapp" }) plus connectFirestoreEmulator, etc.), otherwise your app and the Emulator UI likely end up looking at different data. Function URLs include it too: http://localhost:5001/demo-myapp/us-central1/helloWorld.