-
Notifications
You must be signed in to change notification settings - Fork 1.6k
"app has not yet been configured" exception when calling FirebaseApp.configure() #5075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment has been minimized.
This comment has been minimized.
Thanks for the report and example project! This is definitely a configuration issue and Firebase being a static framework instead of a dynamic framework. When running the example I see this log (among other identical ones for different classes):
Here's a good example of what can be done to avoid this: #4777 (comment) The code to assign the There's also an issue tracking the decision to avoid hardcoding static frameworks in #2022 |
We are facing this exact same issue and the comment solution is not working for the Pod set up we have. Will there be any fixes or workaround for this? |
To close my side of the loop on this, the configuration issue that was pointed out was indeed an issue. We attempted to rework our Podfile in the way recommended by #4777 (comment). However, we ran into a second issue after updating our Podfile because of the In the end, we did make the suggested structural changes to our Podfile, but we nevertheless ended up removing the If I have time this week I'll see if I can reproduce the Firebase/Realm incompatibility issue in my sample project for your consideration. |
Uh oh!
There was an error while loading. Please reload this page.
Step 1: Describe your environment
CocoaPods
Step 2: Describe the problem
After upgrading my
pod 'Firebase/Analytics'
from 6.13.0 to 6.19.0, callingFirebaseApp.configure()
throws an exception stating thatThe default Firebase app has not yet been configured. Add [...]
. This is obviously circular, so I don't know what to do.When I set a breakpoint on that logged error in
FIRApp.m::245
, you can see that the stack trace originates at[FIRApp configure]
and then throws the error inside[FIRApp defaultApp]
after trying to configureFIRInstallations
(which seems like a new thing since my pod upgrade).Inspecting
sDefaultApp
at this breakpoint does in fact print outnil
, butsDefaultApp
was set to an instance up in[FIRApp configureWithName:options:]
, and if I go up one frame into[FIRInstallations installations]
, printingsDefaultApp
prints the expected instance, which I find very strange.Steps to reproduce:
I've attached a project that reproduces the issue and follows the same initialization pattern that our production app uses (ObjC/Swift mixed initialization with Firebase eventually initialized in Swift code). It appears that this happens when a second target that also depends on the
Firebase/Analytics
pod is added as a dependency on the main target. That is, I was not able to reproduce the issue with a blank project with only one target, but once I added a second target the exception was thrown.Relevant Code:
FirebaseTest.zip
Podfile (included in the zip above, but just for transparency to others):
The text was updated successfully, but these errors were encountered: