Skip to content

fix(user): remove eager Firebase.messaging call that crashes before FirebaseApp init#773

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/firebase-init-crash
May 26, 2026
Merged

fix(user): remove eager Firebase.messaging call that crashes before FirebaseApp init#773
bmc08gt merged 1 commit into
code/cashfrom
fix/firebase-init-crash

Conversation

@bmc08gt
Copy link
Copy Markdown
Collaborator

@bmc08gt bmc08gt commented May 26, 2026

The Firebase.messaging.token call in UserManager.init runs during Hilt graph construction in FlipcashApp.onCreate(). On some devices, Firebase has not yet initialized at this point, causing an IllegalStateException.

This call is redundant — AuthManager.updateFcmToken() already fetches and registers the push token via PushTokenProvider during login/soft-login.

Fixes: Bugsnag 6a0c83a8dd5b5015ce623eae

…irebaseApp init

The `Firebase.messaging.token` call in `UserManager.init` runs during Hilt
graph construction in `FlipcashApp.onCreate()`. On some devices, Firebase
has not yet initialized at this point, causing an IllegalStateException.

This call is redundant — `AuthManager.updateFcmToken()` already fetches and
registers the push token via `PushTokenProvider` during login/soft-login.

Fixes: Bugsnag 6a0c83a8dd5b5015ce623eae

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@bmc08gt bmc08gt self-assigned this May 26, 2026
@github-actions github-actions Bot added type: fix Bug fix area: network gRPC, connectivity, API, exchange rates and removed type: fix Bug fix labels May 26, 2026
@bmc08gt bmc08gt merged commit 87fdeaf into code/cash May 26, 2026
3 checks passed
@bmc08gt bmc08gt deleted the fix/firebase-init-crash branch May 26, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant