By default, Firebase Crashlytics automatically instruments your Flutter project to upload the necessary symbol files that ensure crash reports are deobfuscated and human readable.
Unfortunately, there are cases that can result in the project not being fully configured. This guide outlines what the automation does and provides first steps to debug your project setup.
Apple platforms
Adding the Crashlytics Flutter plugin and running the
flutterfire configure
command will attempt to add a run script to your
project’s Xcode workspace that finds and uploads the necessary dSYM symbol files
to Crashlytics. Without these files, you’ll see a "Missing dSYM" alert in
the Crashlytics dashboard and exceptions will be held by the backend until
the missing files are uploaded.
If you have this issue, first make sure that you have the run script installed:
Locate and open the Xcode workspace file in your project’s iOS directory (
FLUTTER_PROJECT_NAME/ios/Runner.xcworkspace
).Identify whether a run script titled
[firebase_crashlytics] Crashlytics Upload Symbols
has been added to the Runner target’s Build Phases.
If this run script does not exist, you can add it manually:
Locate the Firebase App ID for your Apple app. Here are two different places where you can find this ID:
In the Firebase console, go to your
. Scroll down to the Your apps card, then click on your Firebase Apple App to view the app's information, including its App ID. > Project settings In your Flutter project's top-level directory, find your
firebase_options.dart
file. The Firebase App ID for your Apple app is labeled asGOOGLE_APP_ID
.
Click
> New Run Script Phase.Make sure this new Run Script phase is your project's last build phase. Otherwise, Crashlytics can't properly process dSYMs.
Expand the new Run Script section.
In the script field (located under the Shell label), add the following run scripts.
These scripts process your project's dSYM files and upload the files to Crashlytics.
$PODS_ROOT/FirebaseCrashlytics/upload-symbols --build-phase --validate -ai FIREBASE_APPLE_APP_ID
$PODS_ROOT/FirebaseCrashlytics/upload-symbols --build-phase -ai FIREBASE_APPLE_APP_ID
In the Input Files section, add the paths for the locations of the following files:
The location of your project's dSYM files:
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
Providing the location of your project's dSYM files enables Crashlytics to process dSYMs for large apps more quickly.
The location of your project's built
Info.plist
file:$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
Providing the location of your project's built
Info.plist
file enables Crashlytics to associate an app version with the dSYMs.
If the run script does exist, refer to the Apple-specific guide for troubleshooting dSYM issues. You’ll need to take the following additional steps if you choose to upload your dSYM files via the described process:
Locate the Firebase App ID for your Apple app. Here are two different places where you can find this ID:
In the Firebase console, go to your
. Scroll down to the Your apps card, then click on your Firebase Apple App to view the app's information, including its App ID. > Project settings In your Flutter project's top-level directory, find your
firebase_options.dart
file. The Firebase App ID for your Apple app is labeled asGOOGLE_APP_ID
.
When running the
upload-symbols
script, use
instead of-ai FIREBASE_APPLE_APP_ID .-gsp /path/to/GoogleService-Info.plist
Android
The flutterfire configure
command attempts to add necessary dependencies to
your project’s Gradle build files. Without these dependencies, crash reports in
the Firebase console may end up obfuscated if obfuscation is turned on.
Make sure the following lines are present in the project-level build.gradle
and in the app-level build.gradle
:
In the project-level build file (
android/build.gradle
), check for the following line:dependencies { // ... other dependencies classpath 'com.google.gms:google-services:4.3.5' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1' }
In the app-level build file (
android/app/build.gradle
), check for the following line:// ... other imports android { // ... your android config } dependencies { // ... your dependencies } // This section must appear at the bottom of the file apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics'
If problems persist, refer to the Android-specific guide for troubleshooting obfuscated reports.