invertase / flutterfire_cli

A CLI to help with using FlutterFire in your Flutter applications.
Apache License 2.0
172 stars 48 forks source link

[bug]: Missing dSYM files from obfuscated and released iOS app #342

Open Tom3652 opened 1 week ago

Tom3652 commented 1 week ago

Is there an existing issue for this?

CLI Version

1.0.0

Firebase Tools version

13.20.2

Flutter Doctor Output

flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-x64, locale fr-FR) [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 16.0) [✓] Chrome - develop for the web [✓] Android Studio (version 2024.2) [✓] VS Code (version 1.94.0) [✓] Connected device (3 available) [✓] Network resources

• No issues found!

Description

I am creating this issue to follow-up on this issue After releasing an app with this command :

flutter build ipa --obfuscate --release --split-debug-info=/Users/foxtom/StudioProjects/MyProject/build --build-name=1.1.0 --build-number=1

And having this script as the last Build Phase in Xcode :

#!/bin/bash
PATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin
flutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default
Capture d’écran 2024-10-08 à 09 47 48

The result is this crashlytics dashboard (please see Screenshots below)

Steps to reproduce

Try to create a .ipa file with an xcode archive using flutter build ipa --obfuscate --release --split-debug-info=/Users/foxtom/StudioProjects/MyProject/build --build-name=1.1.0 --build-number=1 for a complex project with a lot of dependencies (since i don't know which one is missing, or maybe some flutter dSYMs ?)

Expected behavior

I would like the flutterfire_cli to upload all the dSYMs for my project to crashlytics.

Screenshots

Capture d’écran 2024-10-08 à 09 41 06

Additional context and comments

Note : this may be an issue unrelated to flutterfire_cli and there are actually really missing dSYM files from the xcode archive that you can't find either, in that case it would be a Flutter issue when building a released obfuscated iOS IPA that doesn't put all the dSYM into the archive...

Tom3652 commented 1 week ago

I have just build in release mode without obfuscation and i saw 2 crashlytics missing dSYM very quickly by running into an error in my app. One of the missing dSYM file was inside : /build/ios/Release-iphoneos/ and was the Runner.app.dSYM that didn't seem to be uploaded during the build. The second missing dSYM file apparently doesn't exist on my local machine after the build.

I have found the first by running : mdfind -name .dSYM | while read -r line; do dwarfdump -u "$line"; done

It may be a first lead 🙏