java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process xxx.xxxxx.xxxxxx. Make sure to call FirebaseApp.initializeApp(

Hello guys,

Why my app is crashing due complaint about the FirebaseApp.initializeApp() but I’m not using any Firebase service. Please see the attachment.

Here is build.settings

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { -- Mac/Win specific window = { titleText = { default = "Apper", } }, orientation = { default = "portrait", supported = { "portrait", } }, osx = { plist = { NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, } }, splashScreen = { enable = false }, iphone = { xcassets = "Images.xcassets", plist = { UIBackgroundModes = {"remote-notification"}, NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, ITSAppUsesNonExemptEncryption=false, CFBundleURLTypes={ CFBundleURLSchemes={"xxx.xxxx.xxxxxx"} }, UIStatusBarHidden = true, UIPrerenderedIcon = true, -- set to false for "shine" overlay -- Launch image files table UILaunchImages = { { -- iPhone 4 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 5 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPhone 6 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, }, UIApplicationExitsOnSuspend = false, -- this must be false to make app alive when facebook native app will be opened FacebookAppID = "XXXXXXXXXX", -- Replace XXXXXXXXXX with your Facebook App ID CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXXX", } } -- Replace XXXXXXXXXX with your Facebook App ID }, -- Whitelist Facebook apps LSApplicationQueriesSchemes = { "fb", -- Needed for the facebook-v4.isFacebookAppEnabled() API "fbapi", "fbauth2", "fb-messenger-api", "fbshareextension" }, } }, plugins = { ["plugin.OneSignal"] = { publisherId = "com.onesignal", }, ["plugin.notifications.v2"] = { publisherId = "com.coronalabs" }, ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms={ android=true } }, ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, ["plugin.zip"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true, osx=true, win32=true } }, ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, }, }, ["plugin.reviewPopUp"] = { publisherId = "tech.scotth", }, --[[["plugin.facebook.v4"] = { publisherId = "com.coronalabs" }, ["plugin.facebookAnalytics"] = { publisherId = "tech.scotth", supportedPlatforms = { iphone=true, android=true, ["android-kindle"]=true } }, --]] }, android = { minSdkVersion = "19", largeHeap = true, permissions = { {name=".permisssion.C2D\_MESSAGE", protectionLevel="signature"} }, usesPermissions = { "android.permission.INTERNET", "android.permission.CAMERA", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.READ\_EXTERNAL\_STORAGE", "android.permission.READ\_PHONE\_STATE", "com.android.vending.BILLING", "com.android.vending.CHECK\_LICENSE", "android.permission.GET\_ACCOUNTS", "android.permission.RECEIVE\_BOOT\_COMPLETED", "com.google.android.c2dm.permission.RECEIVE", ".permission.C2D\_MESSAGE", }, facebookAppId = "XXXXXXXXXX", -- Replace XXXXXXXXXX with your Facebook App ID }, excludeFiles = { -- Exclude all files at paths which end with "secret.txt" all = { "\*secret.txt" }, -- Exclude all Android icon files iphone = { "Icon-\*dpi.png" }, -- Exclude iOS "retina" image files android = { "Icon.png", "\*@2x.png", "\*@3x.png", "Default\*.png" }, -- Exclude unnecessary assets from OS X desktop apps osx = { "Default\*.png", "Icon\*.png", "Icon\*.ico" }, -- Exclude unnecessary assets from Win32 desktop apps win32 = { "Default\*.png", "Icon\*.png", "Icon\*.ico", "Icon\*.icns" }, }, }

I’m using Corona version: Version 2018.3380 (2018.9.21)

Regards,
Usman Mughal

But you are:

["plugin.notifications.v2"] = { publisherId = "com.coronalabs" },

You either have to remove this plugin or follow all the steps in the documentation:

https://docs.coronalabs.com/plugin/notifications-v2/index.html

Just a quick look at the build settings you are missing this:

android = { useGoogleServicesJson = true, },

And since you are missing that you probably didn’t do this:

Copy google-services.json, provided in the Firebase console, to your Corona project’s root directory alongside main.lua.

But you are:

["plugin.notifications.v2"] = { publisherId = "com.coronalabs" },

You either have to remove this plugin or follow all the steps in the documentation:

https://docs.coronalabs.com/plugin/notifications-v2/index.html

Just a quick look at the build settings you are missing this:

android = { useGoogleServicesJson = true, },

And since you are missing that you probably didn’t do this:

Copy google-services.json, provided in the Firebase console, to your Corona project’s root directory alongside main.lua.