Skip to content

[codex] Fix Firebase initialization lifecycle hook#269

Merged
jjoonleo merged 1 commit intodeployfrom
codex/fix-firebase-initialization
May 6, 2026
Merged

[codex] Fix Firebase initialization lifecycle hook#269
jjoonleo merged 1 commit intodeployfrom
codex/fix-firebase-initialization

Conversation

@jjoonleo
Copy link
Copy Markdown
Contributor

@jjoonleo jjoonleo commented May 6, 2026

What changed

  • Switched Firebase initialization from javax.annotation.PostConstruct to jakarta.annotation.PostConstruct.
  • Added startup logs for successful/already-present Firebase initialization.

Why

The production container has the Firebase service account mounted correctly and firebase.service-account.path configured, but scheduled push notifications fail with:

FirebaseApp with name [DEFAULT] doesn't exist.

This indicates the initializer method is not being invoked before FirebaseMessaging.getInstance() is used. On Spring Boot 3 / Spring 6, lifecycle annotations should use the Jakarta namespace.

Impact

The default Firebase app should be initialized during Spring startup, allowing scheduled Firebase push notifications to send normally.

Validation

  • ./gradlew compileJava passes.

Post-deploy check

Look for this line in container startup logs:

Firebase initialized successfully

@jjoonleo jjoonleo marked this pull request as ready for review May 6, 2026 05:18
@jjoonleo jjoonleo merged commit 56ac641 into deploy May 6, 2026
@jjoonleo jjoonleo deleted the codex/fix-firebase-initialization branch May 7, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant