Skip to content

The default Firebase app does not exist. Make sure you call initializeApp() #5980

@christhompsongoogle

Description

@christhompsongoogle

Discussed in #5910

From Geoffrey-Pliez:

the script no longer passed in the firebase-frameworks/firebase-aware.

Here is the minimal source code to reproduce the problem.

When I test locally with the prod_preview command (set FIREBASE_FRAMEWORKS_BUILD_TARGET=production&& npm run emulators),
it works correctly and the code passes well in firebase-aware.

When I deploy on the server (firebase hosting) via the firebase deploy command, it no longer works and get the message
[ssr] Error: The default Firebase app does not exist. Make sure you call initializeApp() before using any of the Firebase services.
and guess that on the server the firebase-aware script is no longer called.

I'm not sure but I think it's since upgrading from 11.30.0 to 12.0.0

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions