Closed FrancoisLefevre12 closed 4 years ago
I found a few problems with this issue:
@FrancoisLefevre12 We are sorry you are experiencing the issue. Could you provide additional info that can help investigation:
objc[40943]: Class FIRApp is implemented in both
~/Library/Developer/Xcode/DerivedData/FrameworkTest-apqjxlyrxvkbhhafhaypsbdquref/Build/Products/Debug-iphonesimulator/DynamicFramework.framework/DynamicFramework
(0x10b2a87f8) and
~/Library/Developer/CoreSimulator/Devices/4821F959-24A6-4D78-A102-4C5703103D99/data/Containers/Bundle/Application/F017D210-113A-4DAF-9E17-BDE455E71E06/FrameworkTest.app/FrameworkTest
(0x10ad2d348). One of the two will be used. Which one is undefined.
Thanks.
Yes ! The first thing we did when we had this issue was to update Firebase version from 6.20.0 to 6.23.0. This issue happens on both. We tried on different devices including iPad Pro 11 inches, iPhone XR, iPhone 11 Pro ... We tried to use another Xcode version which was 11.4 and the problem was still there. Nothing changed before we started getting the crash : in fact, we succeeded in releasing a version few weeks ago, which includes the line crashing now. Everything is still fine with this version on production. We tried to deploy the same version without any update to it just now. By now, this version (with the same source code than the successful one) is crashing, thing that I cannot understand. Additionally, It's important to tell that the app does not crash when building from my computer directly. This crash only occurs when we deploy the app to Testflight with BuddyBuild (CD solution) using 11.4.1 Xcode version.
Not at all. The only warning that looks like this one is the following one when I built from my computer:
objc[9109]: Class CLSUserDefaults is implemented in both /System/Library/Frameworks/ClassKit.framework/ClassKit (0x1e3e5c670) and /private/var/containers/Bundle/Application/B0C5E6C7-D822-4F88-8869-A24CA0DB3026/... (0x10693b088). One of the two will be used. Which one is undefined.
Thank you !
It will be really helpful to understand the difference between your local setup and Testflight with BuddyBuild. Do you rebuild from bitcode when you archive locally? May you have different optimization flags, etc.
Most likely unrelated to the particular crash but the warning indicates that you have 2 copies of CLSUserDefaults
class in your app runtime. Most likely information from Using Firebase from a framework or a library will be relevant for CLSUserDefaults
library usage as well
Could you try to detect and post the difference between your local setup and Testflight with BuddyBuild?
As I suspect a possible Swift compiler/Xcode bug leading to the incorrect memory management with some combinations of flags I would suggest to try a workaround to "help" the compiler e.g. :
let sessionID = UUID().uuidString
Analytics.setUserProperty(sessionID, forName: "dk_sessionId")
I don't think there is any difference between those configurations, the only thing we configure on Buddybuild is the Xcode version we want to use to deploy (11.4.1 by the way). Unfortunately, we disabled "enable bitcode" option on our project, is this a problem? We also tried to archive the app locally on our machine and upload manually to Connect, but the crash was still there.
Okay, we will check this out. Thank you for this information !
As I suspect a possible Swift compiler/Xcode bug leading to the incorrect memory management with some combinations of flags I would suggest to try a workaround to "help" the compiler e.g. :
let sessionID = UUID().uuidString Analytics.setUserProperty(sessionID, forName: "dk_sessionId")
We already tried to create sessionID
as a global attribute and it also crashes unfortunately ...
About our Buddybuild configuration:
How is Firebase linked into the app? Is it linked directly to the app or linked into dynamic libraries?
While the Binary Image
listing shows some Firebase dependencies like nanopb
and GoogleUtilities
, I don't see FirebaseAnalytics
.
We integrated Firebase via Cocoapods :) So directly to the app, I don't think it's linked into dynamic libraries.
Is it a problem that it doesn't appear?
It's probably right since FirebaseAnalytics should be statically linked and the listed frameworks are dynamically linked.
Any luck at reproducing locally? Does changing to a Release configuration build versus a Debug configuration make a difference?
Okay then we should be good on this side !
Unfortunately, I can't reproduce it locally. I tried to put the Release configuration for the Debug one but it does not crash, using same compiling mode, etc... No way to reproduce it locally.
The issue might be related to sqlite3. Firebase Analytics expects to use the system sqlite3 and based on the backtrace, it looks there is an sqlite3.c linked into the app that may not be compatible.
Thank you for this information. How can I know where this incompatible file comes from?
One way would be to search the project using the Xcode Project Navigator file filter
Hey @FrancoisLefevre12. 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 @FrancoisLefevre12. 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.
@FrancoisLefevre12 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.
Step 1: Describe your environment
CocoaPods
Step 2: Describe the problem
Steps to reproduce:
What happened? How can we make the problem occur? This could be a description, log/console output, etc.
-> A piece of code was working fine during months but not anymore since a few days ago. It makes crash at launch our application.
Relevant Code: