Is there an existing issue for this?
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
- Create a Flutter app with a flavor, e.g.
staging (build configurations Debug-staging, Release-staging, Profile-staging).
- Add
firebase_core and firebase_crashlytics, run flutterfire configure, then pod install so the upload-symbols phase is added.
- Keep
DEBUG_INFORMATION_FORMAT = dwarf for Debug-staging (the template default for Debug).
flutter run --flavor staging -t lib/main_staging.dart -d <physical iOS device>
- 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).
Is there an existing issue for this?
Which plugins are affected?
Crashlytics
Which platforms are affected?
iOS
Description
ios/crashlytics_add_upload_symbols(run from the podspec duringpod install) adds a[firebase_crashlytics] Crashlytics Upload Symbolsbuild phase to the Runner target with this script:It has no Debug skip. With the default Flutter iOS template, Debug uses
DEBUG_INFORMATION_FORMAT = dwarf, so no dSYM is produced. When runningflutter runagainst a physical device,upload-symbolslogs this about once per second for ~30 seconds:and then exits non-zero, failing the build:
A common workaround is to hand-add a guard to the phase:
This doesn't work for flavored apps. Flutter requires flavored build configurations to be named
Debug-<flavor>,Release-<flavor>, etc., so$CONFIGURATIONis e.g.Debug-stagingand the guard never matches.Proposed fix
Have
crashlytics_add_upload_symbolsgenerate a phase that skips all Debug configurations and simulator builds:Alternatively, warn and
exit 0when the dSYM is missing instead of failing the build.Reproducing the issue
staging(build configurationsDebug-staging,Release-staging,Profile-staging).firebase_coreandfirebase_crashlytics, runflutterfire configure, thenpod installso the upload-symbols phase is added.DEBUG_INFORMATION_FORMAT = dwarfforDebug-staging(the template default for Debug).flutter run --flavor staging -t lib/main_staging.dart -d <physical iOS device>[firebase_crashlytics] Crashlytics Upload Symbolsphase.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
crashlytics_add_upload_symbolsis byte-for-byte identical in 5.4.0 and onmain, and the 5.4.0 podspec still invokes it.upload-symbols3.21 (latest)Additional context and comments
Same symptom reported in #11934 (fails only on
flutter runto device; closed with a pointer to the docs), #11547, #13428 and #12990. None of them addresses flavoredDebug-*configurations or changes the generated script, which is unchanged onmain(last modified in #17852).