Skip to content

[firebase_crashlytics]: Auto-added "Crashlytics Upload Symbols" build phase fails Debug device builds (no dSYM), including flavored Debug-* configurations #18722

Description

@davidnwaneri

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Crashlytics

Which platforms are affected?

iOS

Description

ios/crashlytics_add_upload_symbols (run from the podspec during pod install) adds a [firebase_crashlytics] Crashlytics Upload Symbols build phase to the Runner target with this script:

"$PODS_ROOT/FirebaseCrashlytics/upload-symbols" --flutter-project "$PROJECT_DIR/firebase_app_id_file.json"

It has no Debug skip. With the default Flutter iOS template, Debug uses DEBUG_INFORMATION_FORMAT = dwarf, so no dSYM is produced. When running flutter run against a physical device, upload-symbols logs this about once per second for ~30 seconds:

upload-symbols[...] Unable to get file attributes for dSYM file at path ".../build/ios/Debug-staging-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF"

and then exits non-zero, failing the build:

warning: DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations. ...
Unable to process Runner.app.dSYM at path .../build/ios/Debug-staging-iphoneos/Runner.app.dSYM
Processing dSYMs...
Command PhaseScriptExecution failed with a nonzero exit code

A common workaround is to hand-add a guard to the phase:

if [ "$CONFIGURATION" = "Debug" ] || [ "$PLATFORM_NAME" = "iphonesimulator" ]; then
  exit 0
fi

This doesn't work for flavored apps. Flutter requires flavored build configurations to be named Debug-<flavor>, Release-<flavor>, etc., so $CONFIGURATION is e.g. Debug-staging and the guard never matches.

Proposed fix

Have crashlytics_add_upload_symbols generate a phase that skips all Debug configurations and simulator builds:

case "$CONFIGURATION" in
  Debug*) exit 0 ;;
esac
if [ "$PLATFORM_NAME" = "iphonesimulator" ]; then
  exit 0
fi
"$PODS_ROOT/FirebaseCrashlytics/upload-symbols" --flutter-project "$PROJECT_DIR/firebase_app_id_file.json"

Alternatively, warn and exit 0 when the dSYM is missing instead of failing the build.

Reproducing the issue

  1. Create a Flutter app with a flavor, e.g. staging (build configurations Debug-staging, Release-staging, Profile-staging).
  2. Add firebase_core and firebase_crashlytics, run flutterfire configure, then pod install so the upload-symbols phase is added.
  3. Keep DEBUG_INFORMATION_FORMAT = dwarf for Debug-staging (the template default for Debug).
  4. flutter run --flavor staging -t lib/main_staging.dart -d <physical iOS device>
  5. The build fails in the [firebase_crashlytics] Crashlytics Upload Symbols phase.

Expected: Debug builds skip symbol upload and the build succeeds.

Firebase Core version

4.9.0

Flutter Version

3.47.2 (stable, d3b14c8769)

Flutter dependencies

  • firebase_core 4.9.0
  • firebase_crashlytics 5.2.2 (reproduced). crashlytics_add_upload_symbols is byte-for-byte identical in 5.4.0 and on main, and the 5.4.0 podspec still invokes it.
  • Firebase iOS SDK upload-symbols 3.21 (latest)
  • Xcode 26.4.1 (17E202), macOS 26.5.1, iOS 26 device (wireless debugging)

Additional context and comments

Same symptom reported in #11934 (fails only on flutter run to device; closed with a pointer to the docs), #11547, #13428 and #12990. None of them addresses flavored Debug-* configurations or changes the generated script, which is unchanged on main (last modified in #17852).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions