Skip to content

FR: initializeServerApp automatic initialization #8863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jhuleatt opened this issue Mar 25, 2025 · 1 comment · May be fixed by #8990
Open

FR: initializeServerApp automatic initialization #8863

jhuleatt opened this issue Mar 25, 2025 · 1 comment · May be fixed by #8990

Comments

@jhuleatt
Copy link
Contributor

jhuleatt commented Mar 25, 2025

Operating System

n/a

Environment (if applicable)

Node.js

Firebase SDK Version

n/a

Firebase SDK Product(s)

app (https://firebase.google.com/docs/reference/js/app.firebaseserverapp)

Project Tooling

Server-rendered web app

Detailed Problem Description

Now that initializeApp supports no-argument initialization (release note, implemented in #8483), it would be great if initializeServerApp did the same. This would allow SSR web apps to use no-args init both on the server and the client.

Steps and code to reproduce issue

const serverApp = initializeServerApp();
@jhuleatt jhuleatt added new A new issue that hasn't be categoirzed as question, bug or feature request question labels Mar 25, 2025
@jhuleatt
Copy link
Contributor Author

A workaround is to pass an auto-initialized FirebaseApp instance to initializeServerApp:

import { initializeApp, initializeServerApp } from 'firebase/app'

const serverApp = initializeServerApp(initializeApp());

@jbalidiong jbalidiong added api: core and removed question new A new issue that hasn't be categoirzed as question, bug or feature request labels Mar 25, 2025
@DellaBitta DellaBitta self-assigned this Mar 25, 2025
@Davileal Davileal linked a pull request May 1, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants