Closed mthormann-dhi closed 2 months ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Thanks @mthormann-dhi, instead of configuring Firebase in the app's init
, could you try implementing a UIApplicationDelegateAdaptor
(https://developer.apple.com/documentation/swiftui/uiapplicationdelegateadaptor), and then calling FirebaseApp.configure()
within your delegate's applicationDidFinishLaunching
API?
I've switched over to using app delegate for Firebase initialization. Most of the time, I'm still seeing it fail with the same error. Every now and then I do very occasionally get in this state where the canvas is working somehow. But if I close Xcode, and just re-open the app and re-enable previews, it just starts failing again.
Have been trying all different combinations of canvas, running the app, killing deriveddata, cleaning build folder, etc. but haven't found anything that keeps it working. Closing and re-opening Xcode always seems to cause the error to happen again regardless.
I see the same issue with the same setup, Firebase 10.17, FBLPromises
2.3.1 and Xcode 15.
same issue with Firebase 10.18 and Xcode 15.0.1
Same issue with Firebase 10.23 and Xcode 15.3
Any updates on this? Seeing the same issue with Firebase 10.25 and Xcode 15.4, however, the SDK installation method is via CocoaPods
We'll investigate if the planned switch to dynamic libraries in Firebase 11 makes a difference.
Hi everyone, the upcoming Firebase 11 release will feature the transition from static XCFrameworks to dynamic XCFrameworks. In some pre-release testing, I was able to confirm that using dynamic XCFrameworks fixes this issue. I'm marking this as Firebase 11 is tentatively scheduled to be released later this month.
Hi everyone, there have been some changes to my above comment. Firebase 11 will no longer feature the transition to dynamic XCFrameworks. This is due to Swift Package Manager not being able to support dynamic binary targets that depend on source targets.
That being said, we identified an alternative fix for this issue that will be coming in Firebase 11.0.0.
@ncooke3 Should this be re-opened in that case so it doesn't fall through the cracks? Or is that already verified as fixed in 11.0?
Hi @mthormann-dhi, this should be fixed in the 11.0.0 Firebase.zip
.
Description
When Firebase is installed manually from zip file, includes both
FirebaseAnalytics
andFirebasePerformance
, and then any SwiftUI file is opened with the canvas. I expected the SwiftUI view shows in preview mode. Instead the SwiftUI view briefly displays and then is replaced by the red 'x' and "Preview Crashed" message. Xcode then shows an "[app] quit unexpectedly" dialog with the option to reopen, report to Apple, or ignore.This happens every time the canvas reloads and makes using Firebase with a manual install (which would save 30 seconds at least on build times and make many processes much faster) impossible.
This issue is essentially the same as #8005 but does not appear to be resolved with the
Promises
2.3.1 distribution. I did check thatFBLPromises
andPromisesSwift
in the 10.14.0 zip file are both on 2.3.1 but the error is still happening.I was also chatting with @ncooke3 in #11104 about this issue as having a stable SPM binary distro would make manual zip install unnecessary.
Created with minimal reproducible example.
Crash view:
Quit dialog:
Sample crash log file: Firebase Canvas Crash Log.txt
Reproducing the issue
FirebaseAnalytics
andFirebasePerformance
. Note this issue does not happen which justFirebaseAnalytics
installed (see screenshot)import Firebase
andFirebaseApp.configure()
in theinit()
). UseUIApplicationDelegate
orinit()
makes no difference.EXPECTED: SwiftUI view shows in preview mode ACTUAL: SwiftUI view briefly displays and then is replaced by the red 'x' and "Preview Crashed" message. Xcode then shows an "[app] quit unexpectedly" dialog with the option to reopen, report to Apple, or ignore.
Firebase SDK Version
10.14.0
Xcode Version
14.3.1
Installation Method
Zip
Firebase Product(s)
Analytics, Crashlytics, Performance, Remote Config
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippet```json Replace this line with the contents of your Package.resolved. ```
If using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippet```yml Replace this line with the contents of your Podfile.lock! ```