I had this error for quite a while where my page would load before the “firebase.initializeApp” function. when I put it in platform.ready(()=>({)} still nothing.
My workaround was to set my “rootPage” to a blank page then:
constructor(platform: Platform,/*public push:Push, translate: TranslateService,*/public alrtCtl:AlertController) {
firebase.initializeApp({
apiKey: "",
authDomain: "",
databaseURL: "",
storageBucket: "",
messagingSenderId: ""
});
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Splashscreen.hide();
});