-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Crash In Did Finish Launch Application #5143
Comments
I found a few problems with this issue:
|
Can you share the full stack trace? |
I faced the same issue here. Can anyone suggest something ? |
@morganchen12 We are not getting any other stack trace. |
@Aishwaryalaxmi Can you try moving the call from
And then when the app crashes, then enter |
I did some digging and found out that My working code(on remote repo) had
and current code(that is crashing) has
Maybe the version difference did some changes that is causing the crash Is there a way to revert back to the pervious version |
If I call configure in the didFinishLaunch everything works fine. But we are calling the configure only when we are accessing the Firebase. This was perfectly working when we are using the old pod. Note: We recently updated the script to upload the dYSM file as per the Firebase direction. |
if you're seeing an exception the stack trace should be printed in Xcode's console above the
Having that text will help us understand the issue further and any other logs you can provide, otherwise we likely won't be able to make progress. Also note: Firebase expects to be called in |
@Aishwaryalaxmi I was using |
I have the same issue. just updated from 6.14.0 and this error started |
As requested above, we'd really like to get a crash backtrace to help with this one. |
I have the same issue. updated from 6.14.0 to 6.21.0. It doesn't crash if I launch from Xcode, otherwise the app crashes. I got following error.
The following is part of a Podfile diff. |
Hi! @ryanwilson I can't get the stack trace at the time of the exception because there is no problem when connected to the debugger(xcode). Instead, I added the code to output the stack trace as below and got it. The following is the call stack when [FIRApp configure] is called in Firebase 6.21.0.
And, The following is the call stack when [FIRApp configure] is called in Firebase 6.14.0.
I think there is an issue in 6.21.0 where FIRApp and FIRInstallations are not properly initialized because they are on different targets. But I don't know if this is an application issue or a library issue. |
I checked which version caused the same problem and got the following results.
|
Could you please share the following:
Could you please also check the recommendations from firebase/quickstart-ios#936 and Using Firebase from a Framework or a library |
@maksymmalyhin Hi! I am using Firebase from framework. I have published a sample project that probably crashes due to the same problem. The actual application is more complicated. |
@mironal Thanks you for the sample project! As far as I can see Firebase is used in both a dynamic framework and the app that depends on this framework. Unfortunately this use case is not supported (see the guide for details). Here is one of potential fixes for you issue mironal/firebase-crash-sample#1 Please let me know if it works for you. |
Hey @Aishwaryalaxmi. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Hi! sorry for the late reply. I had lots of work to do modularizing my project... Now I caught a break and could try again updating firebase. I updated to 6.21.0 and the error happened again. I'm using Firebase in a modular project. here is the Podfile configuration...
|
just deleting the pod and installing version 6.15.0 fixes the crash.. without any code change |
A mentioned above, currently Firebase cannot be used from dynamic frameworks. Please do check Using Firebase from a Framework or a library and a workaround proposed in #5143 (comment). |
Converting the project to use only static libraries is not an option for me. The app is already big as it is.. after the modularization it got bigger, if I change everything to static it will inflate even more, making the benefits of a modular app almost not even worth. If so, how could I achieve this with FirebaseMessaging? Another question I have is: Are there any plans to release a dynamic framework SDK option? |
@rickrvo Why do you think your app size will increase? If all modules in your app are packaged into dynamic frameworks then each of them that depends of Firebase and the app binary itself has its own copy of Firebase. So if you package the modules as static frameworks your app binary size may actually decrease because there will be only one copy of Firebase. |
This will only increase the size of your app if Firebase is shared between multiple app and extension targets. Otherwise, as Maksym says, it will reduce the size of your app by reducing duplication of Firebase. |
You are saying that having a static library which encapsulates firebase? that could work. I just can't quite see how I would implement FirebaseMessaging from the top of my head. You think this could be done, having one framework encapsulating firebase? |
@rickrvo how many runnable app targets do you have (app plus extension targets)? Changing your dynamic framework to a static one shouldn't require any code restructuring. You would still be able to reference Firebase symbols directly in your main app target even if Firebase was also linked as a dependency of a sub-framework. |
I have 2 runnable targets, a core framework and multiple feature frameworks... I need firebasemessaging on the main app, analytics on core and probably on main too (I'm still using fabric sdk but will update to firebase in the near future) and remote config on core. My main app and all features import core. |
@rickrvo I would still suggest to try converting the modules to static frameworks as the easiest and the most starlight workaround working with the current Firebase versions. When evaluating the result please take into account that reducing amount of dynamic libraries used by your app will reduce the app launch time which will improve experience of the app users. Allowing packaging Firebase as dynamic frameworks as another approach is being considered (see #2022). There are still open questions that block implementation of it. If you have other ideas feel free to file a separate future request ticket. Thanks. |
@maksymmalyhin I will try to make the project use static frameworks to study the impact when I get some extra time. But regarding the app lunch time, I think it's the other way around.. Dynamic libraries would only be loaded when used... static are loaded always with the app launch. In case of Firebase yes, even if it is a dynamic framework, it would have to be loaded when the app launches because it uses it on the didfinishlaunching. |
Hey @Aishwaryalaxmi. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Hey @Aishwaryalaxmi. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @Aishwaryalaxmi if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
After the pod update app is crashing in did finish application. This crash is not happening in the previous pod version . Please find the attached logs and the pod versions
Firebase 6.20.0
Firebase core 6.6.4
Firebase performance 3.1.10
Firebase analyticas 6.3.1
Xcode Version: 11.3.1
iOS Version: 13.3
====================================
The default FirebaseApp instance must be configured before the defaultFirebaseApp instance can be initialized. One way to ensure that is to call
[FIRApp configure];
(FirebaseApp.configure()
in Swift) in the App Delegate'sapplication:didFinishLaunchingWithOptions:
(application(_:didFinishLaunchingWithOptions:)
in Swift).(null)
libc++abi.dylib: terminating with uncaught exception of type NSException
The text was updated successfully, but these errors were encountered: