Firebase Initialization issue using expo-notifications only

SDK Version: 44
Platform Android
Expo-firebase-core
Expo-notifications

I am trying to use expo-notifications and has it all almost up and running.
The bad mistake I have done is that I needed to switch to a different firebase project.
Now when the app starts it runs FirebaseInitProvider: FirebaseApp initialization successful
But it seems that the firebase analytics somehow has old values and do not respect what is in my google-services.json file. Therefore firebase gets initiated with the wrong app_id of a firebase app that I have deleted. I have only expo-firebase-core added to my project but in the build log expo-firebase-expo-analytics is added anyway.
I am running a managed expo app at the moment and I don’t want to eject just yet.

I cannot delete the firebase project as I happened to choose a google cloud project used by other stuff and deleting the firebase project will delete the google cloud project as well. Can’t do that…

@notbrent @expoadmin.mbsicorp I don’t know how to reach expo team but I hope you can help.
I do know I am a newbee in expo but I am pretty certain this is an issue in expo libraries and even if not I really really need help to get further with this!

Found the solution even though I don’t like it much.
I installed expo-firebase-analytics in my project and executed resetAnalyticsData() which made firebase read the correct data from google-services.json.
In my opinion two improvements can be made:
1: The reset function should be part of expo-firebase-core. Will be much easier to find if one do not want to use analytics.
2: Expo should not add the expo-firebase-analytics package if it is not installed in the project, that is really bad behavior in my opinion. Only services asked for and used by the project should be installed.

At last I just want to state that Expo is an amazing thingie and really good for a start-up project! Keep improving!!

, Best regards

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.