Common local and staging failures.
Firebase setup issues
Where does it fail?
Tolerate missing client config
When PRC_PLATFORM_FIREBASE_* constants are empty, @prc/firebase skips initializeApp. Blocks must not assume getAuth() ran. Gate UI on a successful sign-in or feature flags.
Regenerate the service account
Ensure private/firebase-service-account.json exists via bin/setup/generate-firebase-service-account.sh (or npm run gen:firebase-sa for staging). Do not commit the file. See docs/dependency-auth.md.
This answer needs a valid destination.
Edit the block and connect this answer to another question or outcome.
auth/invalid-api-key in the browser
Client config is empty or wrong for the environment. Prefer letting the module skip init rather than forcing credentials on alpha. Check PRC_PLATFORM_FIREBASE_* vs *__DEV selection in class-assets.php.
Server SDK cannot initialize
Missing or wrong firebase-service-account.json under WPCOM_VIP_PRIVATE_DIR. Regenerate for the target env:
bash ./bin/setup/generate-firebase-service-account.sh --env production
npm run gen:firebase-sa
Legacy vs modern mismatch
New work should import @prc/firebase. Older interactives still enqueue the firebase handle and expect window.firebase globals.