Unity Firebase Analytics 6.15.2 crash - ios

I have implemented Firebase Analytics 6.15.2 into my project, then I have builded the Xcode project and have run it on the device, everything went perfect, but when I try to open the app afterwards, without it running from Xcode - it crashes after 20 seconds of launch screen.
So I have no logs and anything, I somehow figured out it's an issue with Firebase and downgraded the pods in the Xcode project to Firebase 5.3.0, it worked.
I have other projects where the same issue is occurring.
So my question is, how do I fix it? Because there is no way it's happening to everyone, I might be doing something wrog here and I just don't see it.
I use Unity 2020.1.2f1
Firebase Core + Analytics 6.15.2 via Package Manager (also tried installing it manually, still the same)
Other plugins I am using are Facebook and ironSource
ps. The funny thing that it crashes on all devices, but it passes Apple review because they test it in some kind of debug mode, but when it's in release mode - it crashes.

Have you tried to reinstall Firebase Analytics 6.15.2? Also, you can try to restart your device and try to make it work again.

You need to add the debug symbols to your app debug archive file:
Select your Target -> Build Settings -> Build Options -> Debug
Information Format
Then Select DWARF with dSYM file for the debug mode.

Related

Crashlytics report can be generated only after re run the app

I just implemented Fabric Crashlytics tool to my Xcode project via Swift Package Dependencies.
All works good if I enable Google Analytic on a step when I create an app, without this step I did not received crash reports, so I switched to the app with Google Analytic enabled.
I've tested crash button from the link:
One comment that I don't like from there
"After your app crashes, run it again from Xcode so that your app can
send the crash report to Firebase."
Does it mean that user has to reopen app to send crash report? For example if a user download an app from the App Store and then somehow the app is crashed. Does mean that reopening app required for sending that crash? And if the user will not open the app it means I lost this crash report? I understand that on live store there is no option to re run it form Xcode, but reopening seems a require step.
I suppose the crash report should work different a bit by sending issue details right after a crash, I may be wrong here.
Also when I set everything via Swift Package Dependencies looks like I don't have an option to upload dSYM via this option
/path/to/pods/directory/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p ios /path/to/dSYMs
Does this mean I need to pull Fabric and Crashlytics from CocoaPods?
I've switched off bitcode at the moment and looks like all is works automatically but not sure it is good idea for long perspective.
Yes, crashes will be uploaded when restarting the app after it crashes. As far as I know, this is because the SDK may not have enough time to actually send the report when the crash happens.
If you are using Swift Package Manager, you still have that option.
This is the command:
"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
If the app has bitcode enabled, then you'll need to download the dSYMs from the App Store and upload them manually.
Lastly, Fabric is now deprecated so don't download it. You don't need to use Cocoapods if you are already integrated Crashlytics with SPM.

Fabric Crashlytics not working. iOS 14 app/XCode 12

Firebase integration with my app is working like a charm.
So I tried to add Crashlytics.
After pod the SDK and configuring my app in XCode, I've got the version message on log:
"2020-10-23 14:13:36.386002-0300 Findn[44158:3074710] [Firebase/Crashlytics] Version 4.6.2"
But at Firebase Console there isn't a card for Crashlytics.
And at Crashlytics tab this circle keep spinning.
Any tips?
EDIT:
Guess I wasn't clear enough, sorry.
I did follow all guidelines to integrate Firebase to my app.
The problem seems to be on Firebase side, since my app's log does not report any errors on xcode.
Yes, Now you can not use fabric solely. You have to integrate firebase to use a fabric.
Check this link:
firebase crashlytics
Maybe the solution is here!
The steps are the following:
Ensure you add the code in order to force a crash, something like that firebase
First, you need to build the app and launch the app with Xcode,
Next launch without attaching with Xcode (manually, tapping on icon app), and force crash app with fatalError()
Then launch with Xcode and the app will send the traces... 💥

Added Google Crashlytics in iOS - Does not connected to Firebase Crashlytics Dashboard

https://firebase.google.com/docs/crashlytics/get-started?authuser=2
I followed this link and the Firebase Analytics connected and showed events, but Firebase Crashlytics is not showing any crash, it isn't even able to connect to App.
And keeps showing the following image when clicked on Crashlytics in Left panel from Firebase Console.
This is a fresh project Firebase Crashlytics works fine with the earlier projects created using Fabric.
I resolved this issue by Adding Run Script as shown in Firebase, also I did a fresh start.
https://firebase.google.com/docs/crashlytics/get-started
For some reason, following the Firebase docs did not work for me as I had to do a few additional things for the "Add the SDK" loading screen to disappear on the Firebase portal and show me the crashes.
In addition to what the Firebase docs say, I did the following in addition to this answer which I have also outlined on a similar issue here
Go to Build Settings -> Debug Information Format -> Set all of them to DWARF with dSYM file
Go to Build Phases -> Add an additional run script and input the following
${PODS_ROOT}/FirebaseCrashlytics/upload-symbols -gsp ${PROJECT_DIR}/Your_path/GoogleService-Info.plist -p ios ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}
Remember to replace {PROJECT_DIR} appropriately for your project
Stage a crash in your application as described here
Disconnect your device / simulator from the debugger AKA launch it on your own rather than running it from XCode and then perform the crash
I was now able to see the above loading disappear and I could see my crash statistics instead

Why does my Flutter app crash at startup on iOS?

I'm trying to build a simple app using Flutter for iOS and Android, but the app crashes on startup when I try to run it on an iPhone (Android runs fine). I don't have a mac, so I'm using Codemagic to compile a release build and deploy to TestFlight, then installing on an iPhone from there. Apple only shows their crash logs in Xcode as far as I can tell (nothing in App Store Connect online?), and since I don't have a mac, I can't see those. Any thoughts as to what I might be running into, or what information I can gather to debug the problem?
Thanks!
Edit: I've been digging around some more and it looks like the crash is related to the Firebase dependencies. If I create the Flutter demo project (flutter create ), it runs fine on iOS. However if I then add Firebase packages to pubspec.yaml, and manually add GoogleServices-info.plist, the app crashes on startup. (I'm not adding any code that uses Firebase yet.) GoogleServices-info.plist is supposed to be added with Xcode, but since I don't have Xcode or a mac, that makes it tough. The second answer to this question gives a suggestion: Where to save GoogleService-Info.plist in Flutter without Xcode?
I tried making those changes but got the same result. Anybody have any recommendations for adding Firebase without a mac?
Ok, so here's what happened. Originally the app crashed on iOS because there were issues with the GoogleServices-info.plist file (probably). There were no error messages, so I didn't know where to look. I finally just went back to the simple demo app and started layering things back in to isolate the issue. The demo app would build and run on iOS with no problems, but when I added the Firebase dependencies (as a group), it failed. I had added the GoogleServices-info.plist file manually (outside of Xcode) and adjusted the references in ios/Runner.xcodeproj/project.pbxproj using a text editor, but that didn't do the trick.
At this point I finally broke down and got a MacBook. Debugging on the Mac, I could now see that the app crashed in debug mode on the emulator as well as when in release mode on a device, but still no helpful error messages. I added the GoogleServices-info.plist file using Xcode, so at least that piece was correct, but the app still crashed immediately. Going through the documentation, I realized that when I made the sample app, I had forgotten to add the app ID in the info.plist file for AdMob. At this point it was just AdMob causing the crash, not the other Firebase dependencies. I added that back in and things ran fine. I wish I had looked at that a month ago. Ugh.
Thanks #Mikhail Tokharev and #season for taking a stab at such a vague question. I wish I had more detail to share initially, but I didn't know enough yet to know what could be going wrong.
TL;DR
Just get a Mac. Trying to debug through Codemagic won't work.
For Firebase, be sure you actually add your GoogleServices-info.plist file through Xcode. Trying to add it manually and hack the project.pbxproj file probably won't work (this a practical recommendation, I didn't prove this conclusively).
https://firebase.google.com/docs/flutter/setup?platform=ios#add-config-file
For AdMob, be sure to add your application ID to the info.plist. https://pub.dev/packages/firebase_admob
I've been facing this error since the last few days and I happen to solve it today. So, I would like to share it with anyone facing startup error after connecting their iOS app to firebase.
I had followed all the steps while setting up a new iOS app with firebase and this was what exactly caused the error, in my case. If you have placed import 'Firebase' and Firebase.configure() in your AppDelegate.swift, then remove it and run your app again. I removed those two lines and it worked fine. Test it with Cloud Firestore (just make a button write something to your cloud firestore) and make sure you add await Firebase.initializeApp(); as well when the button is pressed.
I did all of those steps and it worked fine with me.
P.S. I did it with android studio in a Mac.
For any newbies out there like me, make sure registering firebase is before GeneratedPluginRegistrant in your ios/Runner/AppDelegate.swift file.
// This works without crashes, FirebaseApp.configure() after GeneratedPluginRegistrant crashes
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
i had the same issue and i have fixed it as i was new to ios deployment i forgot to add capabilities which indeed crashed my app in testflight ...so please be sure you have added required capabilities in signing and capability tab in xcode
use terminal to run the app.
run this command
flutter run --release
For iOS: In our case this happened because of Facebook plugin update.
Previous version: flutter_facebook_auth: ^3.5.1
New Version: flutter_facebook_auth: ^4.3.3
We were missing FacebookClientToken in Info.plist file. So after adding that it worked.
<key>FacebookClientToken</key>
<string>$(FACEBOOK_CLIENT_TOKEN)</string>
most probably you've faced with next Flutter issue https://github.com/flutter/flutter/issues/54707
I had the same problem and solved it as below :
In the folder of flutter sdk,
I did git pull then run the app again and it was solved .
If you using Google Firebase library in flutter app
Make sure use FirebaseApp.configure() before GeneratedPluginRegistrant.register(with: self) in AppDelegate.swift file.
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)

Crashlytics is not sending Crash report from iPhone

I've setup the Crashlytics in my one iOS application and installed the application on a real device. My Crashlytics Dashboard is displaying that, I've successfully added the app. However, it's not sending crash report. My internet speed is not so good. But I can check my emails from this device. Can anybody guess, where is the problem?
Xcode debugger does NOT allow Crashlytics to process crash reports. Yeah, that seem weird even to me when I read that first time but it is a fact (Source). That's is the reason we never see crash report When:
- running app in Simulator
- running app on iDevice by directly build and run from Xcode with debugger on.
To make sure a crash is reported during your testing (copied from Crashlytics support site):
1. Launch simulator
2. Press stop
3. Launch your app and force a crash
4. Relaunch the app from simulator
5. See the crash report in the web dashboard.
EDIT:
Added a reference; Crashlytics also provides a short article on a quick way to force a crash.
My be it's late but work 100%
Make some changes in project build settings like in below image
and follow these instructions.
The primary reason any crash reporter won't work on iOS is due to interference from different crash reporters. However, with Crashlytics specifically there could be something specific to them causing the crash report not getting reported.
Xcode debugger does NOT allow Any Crash Reporter to process crash reports. This is because XCode overrides any hooks into the crash handling call backs. This only happens when:
running app in Simulator (with debugger on)
running app on iDevice by directly build and run from Xcode with debugger on.
To make sure a crash is reported during your testing (http://support.crashlytics.com/knowledgebase/articles/92523-why-can-t-i-have-xcode-connected-):
Launch simulator
Press stop
Launch your app and force a crash
Relaunch the app from simulator
See the crash report in the web dashboard.
While a super old video it's still relevant, here's a video of the steps above (example from Crittercism): https://www.youtube.com/watch?v=sU6Su3PBFH4
For me, the problem was that the device was connected to my Mac :)
From this source:
Also, if you have your device connected to your Mac, XCode's debugger
will step in as well. So just disconnect the device before testing :)
I found solution using following steps
1. Go to Edit Scheme
2. Run -> Info
3. Change Build Configuration to release.
Now run the app crash it. You will receive mail.
We recently ran into this issue and I found that somewhere along the way the build script was removed. Adding it back in with the following fixed the issue for us:
./Crashlytics.framework/run <your_api_key> <build_secret>
Note : When using Cocoapods you will want to us the following instead of the above (source):
./Pods/CrashlyticsFramework/Crashlytics.framework/run
Adding a build script:
To add a Run Script Build Phase in Xcode 6, select your application target in your project, then select "Build Phases".
Click the small "plus" icon and select "New Run Script Build Phase".
You should now see a Run Script section in the middle of your Build Phase options, as shown above.
Inside the body of the Run Script Build Phase, paste in the script.`
The above quote comes from Crashlytics's visual tutorial, referenced in this post.
Note: I originally posted this answer verbatim for Crashlytics error code: 202 when Submitting files.
From the RayWenderlich site:
You won’t get any crash reports if Xcode intercepts the crash event!
To make all the examples below work, you have to build and run the
application, then click the stop button on Xcode. This way you will
have the latest version installed on the the device. Once that is
done, you can launch the app on the device itself, and then crash it
all you want! All the crashes on your iOS device will be caught and
sent to the server component of the service that you have integrated
into the app. Crash reports are usually sent to the server the next
time you start the app, so the steps to follow to generate a crash
report on the server are as follows: Build and run on Xcode. Press the
stop button. Run the app on your iOS device. Make the app crash. Run
the app again.
Crashlytics works for me until now.
I don't know why but now it doesn't work.
You should turn debug-mode on by
[Crashlytics sharedInstance].debugMode = YES;
My problem is here Crashlytics error code: 202 when Submitting files :(
Make sure you are not forcing the crash too early.
Set [Crashlytics sharedInstance].debugMode to YES;
Watch for
Crashlytics] Settings loaded
on the Xcode console logs.
Then force the crash and restart the app, and the crash will be reported now.
I ran into a similar problem when trying the test crash code.
Crashlytics.sharedInstance().crash()
I was running my app from a device, without Xcode, and the crash wouldn't show up on Crashlytics Dashboard. What worked for me was the following tip from Crashlytics website:
Make sure to launch the app after crashing it, so that the crash can
be uploaded
I commented out the above crash() call, and re-ran the app. Then the crash showed up in the Dashboard.
This is for xcode 9, from crashlytics 3.4.0
After doing this, be patient and wait for a few minutes.
Have you tried running [[Crashlytics sharedInstance] crash] on a device and seeing if that gets reported? There are a few reasons why Crashlytics might not work including other crash reporters etc.
If you don't upload the dSYM file, Crashlytics will not show your crash even though the report successfully uploaded.
You could run into this problem, if you have set up your build-script to only run on your CI server. Then if you have copied your app to your phone via xcode and you run it without being attached to the debugger, the report will be uploaded but ignored, because of the missing dSYM file.
Sometimes, it takes some time for the logs to show up. I am able to find them after 15-20 mins
One of the issue I feel that in the Run Script Phase, it should be a separate Run Script Phase for CrashLytics. When had the run script
./Fabric.framework/run
With some of my other script, everything was ok, CrashLytics log show report submitted, but nothing was in the web interface.
When I add another Run script phase only with Fabric run, it appears like a magic :)
My first try was with cocoapods, but that did not work.
When I manually add all the framework and a separate run script phase that worked.
This worked for me,
If you're testing on iDevice, just unplug iDevice with your Xcode and run your app.
Now, If crashed it will be updated on dashboard.
I solved by deselecting "Run Script only when installing" option in Run script (one for Fabric(crashlytics))

Resources